Skip to content

Commit

Permalink
Using @settings on a test without @given is completely pointless.
Browse files Browse the repository at this point in the history
  • Loading branch information
dariodandrea committed Oct 16, 2023
1 parent 304c8f5 commit 7a38c73
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tests/test_cmab.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def test_cmab_init_with_wrong_blr_models(a, b):
)


@settings(deadline=500)
def test_cmab_update(n_samples=100, n_features=3):
actions = np.random.choice(["a1", "a2"], size=n_samples).tolist()
rewards = np.random.choice([0, 1], size=n_samples).tolist()
Expand Down Expand Up @@ -176,7 +175,6 @@ def run_update(context):
run_update(context=context)


@settings(deadline=500)
def test_cmab_update_not_all_actions(n_samples=100, n_feat=3):
actions = np.random.choice(["a3", "a4"], size=n_samples).tolist()
rewards = np.random.choice([0, 1], size=n_samples).tolist()
Expand Down Expand Up @@ -279,7 +277,6 @@ def test_cmab_predict_shape_mismatch(a_int):
mab.predict(context=[])


@settings(deadline=500)
def test_cmab_predict_with_forbidden_actions(n_features=3):
def run_predict(mab):
context = np.random.uniform(low=-1.0, high=1.0, size=(1000, n_features))
Expand Down Expand Up @@ -438,7 +435,6 @@ def test_cmab_bai_predict(n_samples, n_features):
assert len(selected_actions) == len(probs) == len(weighted_sums) == n_samples


@settings(deadline=500)
def test_cmab_bai_update(n_samples=100, n_features=3):
actions = np.random.choice(["a1", "a2"], size=n_samples).tolist()
rewards = np.random.choice([0, 1], size=n_samples).tolist()
Expand Down Expand Up @@ -581,7 +577,6 @@ def test_cmab_cc_predict(n_samples, n_features):
assert len(selected_actions) == len(probs) == len(weighted_sums) == n_samples


@settings(deadline=500)
def test_cmab_cc_update(n_samples=100, n_features=3):
actions = np.random.choice(["a1", "a2"], size=n_samples).tolist()
rewards = np.random.choice([0, 1], size=n_samples).tolist()
Expand Down

0 comments on commit 7a38c73

Please sign in to comment.