Skip to content

Commit

Permalink
one test
Browse files Browse the repository at this point in the history
  • Loading branch information
endast committed Apr 12, 2024
1 parent ff78d30 commit 05e4578
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ jobs:
shell: micromamba-shell {0}

- name: Run pytest preprocessing
run: pytest -v ${{ github.workspace }}/tests/preprocessing --log-cli-level DEBUG
run: pytest -v ${{ github.workspace }}/preprocessing/test_preprocess.py::test_process_and_combine_sparse_gt --log-cli-level DEBUG
shell: micromamba-shell {0}
22 changes: 6 additions & 16 deletions tests/preprocessing/test_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,6 @@ def test_add_variant_ids(
@pytest.mark.parametrize(
"test_data_name_dir, extra_cli_params, input_h5, result_h5",
[
(
"no_filters_minimal_split",
[
"--chromosomes",
"1,2",
],
[
"genotypes_chr1.h5",
"genotypes_chr2.h5",
],
"genotypes.h5",
),
(
"filter_calls_variants_samples_minimal_split",
[
Expand Down Expand Up @@ -317,7 +305,9 @@ def test_process_and_combine_sparse_gt(
)

expected_data = np.load(expected_array_archive.as_posix(), allow_pickle=True)

assert np.array_equal(written_variant_matrix, expected_data["variant_matrix"])
assert np.array_equal(written_genotype_matrix, expected_data["genotype_matrix"])
assert np.array_equal(written_samples, expected_data["samples"])
expected_data_variant_matrix = expected_data["variant_matrix"]
expected_data_genotype_matrix = expected_data["genotype_matrix"]
expected_data_samples = expected_data["samples"]
assert np.array_equal(written_variant_matrix, expected_data_variant_matrix)
assert np.array_equal(written_genotype_matrix, expected_data_genotype_matrix)
assert np.array_equal(written_samples, expected_data_samples)

0 comments on commit 05e4578

Please sign in to comment.