Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Sep 13, 2024
1 parent 762ecb3 commit 6fdb593
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions test/test_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_generate_counts_bipartite_hamming(self):
hamming_left = 3
hamming_right = 2
counts = generate_counts_bipartite_hamming(
num_samples, num_bits, hamming_left, hamming_right
num_samples, num_bits, hamming_right, hamming_left
)
self.assertLessEqual(len(counts), num_samples)
for bs in counts:
Expand All @@ -92,7 +92,7 @@ def test_generate_counts_bipartite_hamming(self):
hamming_right = 2
with pytest.raises(ValueError) as e_info:
generate_counts_bipartite_hamming(
num_samples, num_bits, hamming_left, hamming_right
num_samples, num_bits, hamming_right, hamming_left
)
self.assertEqual(
"The number of bits must be specified with an even integer.", e_info.value.args[0]
Expand All @@ -104,7 +104,7 @@ def test_generate_counts_bipartite_hamming(self):
hamming_right = 2
with pytest.raises(ValueError) as e_info:
generate_counts_bipartite_hamming(
num_samples, num_bits, hamming_left, hamming_right
num_samples, num_bits, hamming_right, hamming_left
)
self.assertEqual(
"The number of samples must be specified with a positive integer.",
Expand All @@ -117,7 +117,7 @@ def test_generate_counts_bipartite_hamming(self):
hamming_right = 2
with pytest.raises(ValueError) as e_info:
generate_counts_bipartite_hamming(
num_samples, num_bits, hamming_left, hamming_right
num_samples, num_bits, hamming_right, hamming_left
)
self.assertEqual(
"The number of bits must be specified with a positive integer.",
Expand All @@ -130,7 +130,7 @@ def test_generate_counts_bipartite_hamming(self):
hamming_right = -1
with pytest.raises(ValueError) as e_info:
generate_counts_bipartite_hamming(
num_samples, num_bits, hamming_left, hamming_right
num_samples, num_bits, hamming_right, hamming_left
)
self.assertEqual(
"Hamming weights must be specified as non-negative integers.", e_info.value.args[0]
Expand Down
14 changes: 7 additions & 7 deletions test/test_subsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def test_postselect_and_subsample(self):
batches = postselect_and_subsample(
self.bitstring_matrix,
self.uniform_probs,
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -158,8 +158,8 @@ def test_postselect_and_subsample(self):
batches = postselect_and_subsample(
self.bitstring_matrix,
self.uniform_probs,
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -178,8 +178,8 @@ def test_postselect_and_subsample(self):
batches = postselect_and_subsample(
self.bitstring_matrix[1:],
self.uniform_probs[1:],
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -195,8 +195,8 @@ def test_postselect_and_subsample(self):
postselect_and_subsample(
self.bitstring_matrix,
self.uniform_probs,
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -213,8 +213,8 @@ def test_postselect_and_subsample(self):
postselect_and_subsample(
self.bitstring_matrix,
self.uniform_probs,
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -231,8 +231,8 @@ def test_postselect_and_subsample(self):
postselect_and_subsample(
self.bitstring_matrix,
self.uniform_probs,
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand All @@ -249,8 +249,8 @@ def test_postselect_and_subsample(self):
postselect_and_subsample(
self.bitstring_matrix,
np.array([]),
hamming_left,
hamming_right,
hamming_left,
samples_per_batch,
num_batches,
)
Expand Down

0 comments on commit 6fdb593

Please sign in to comment.