Skip to content

Commit

Permalink
Correct variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Sep 18, 2023
1 parent 4ff8f81 commit 8de7de7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions python/tests/test_imputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def test_tsimpute(input_ref, input_query):

# Tests for helper functions.
@pytest.mark.parametrize(
"genotyped_pos,ungenotyped_pos,expected_pos,expected_idx",
"genotyped_pos,ungenotyped_pos,expected_weights,expected_idx",
[
# All ungenotyped markers are between genotyped markers.
(
Expand Down Expand Up @@ -690,12 +690,14 @@ def test_tsimpute(input_ref, input_query):
(np.array([10, 20]), np.array([15]), np.array([0.001]), np.array([0])),
],
)
def test_get_weights(genotyped_pos, ungenotyped_pos, expected_pos, expected_idx):
actual_pos, actual_idx = tests.beagle.get_weights(genotyped_pos, ungenotyped_pos)
np.testing.assert_array_almost_equal(actual_pos, expected_pos)
def test_get_weights(genotyped_pos, ungenotyped_pos, expected_weights, expected_idx):
actual_weights, actual_idx = tests.beagle.get_weights(
genotyped_pos, ungenotyped_pos
)
np.testing.assert_array_almost_equal(actual_weights, expected_weights)
np.testing.assert_array_equal(actual_idx, expected_idx)
actual_idx, actual_idx = tests.beagle_numba.get_weights(
actual_weights, actual_idx = tests.beagle_numba.get_weights(
genotyped_pos, ungenotyped_pos
)
np.testing.assert_array_almost_equal(actual_pos, expected_pos)
np.testing.assert_array_almost_equal(actual_weights, expected_weights)
np.testing.assert_array_equal(actual_idx, expected_idx)

0 comments on commit 8de7de7

Please sign in to comment.