From c84b07b8c5ac0a42c0fab929c75823b30b548191 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 21 Feb 2022 16:21:31 +0300 Subject: Add test to ensure samples are read correctly from .geno files * tests/unit/db/test_genotypes2.py: New file --- tests/unit/db/test_genotypes2.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/unit/db/test_genotypes2.py (limited to 'tests') diff --git a/tests/unit/db/test_genotypes2.py b/tests/unit/db/test_genotypes2.py new file mode 100644 index 0000000..453120b --- /dev/null +++ b/tests/unit/db/test_genotypes2.py @@ -0,0 +1,13 @@ +"""Module to test functions in gn3.db.genotypes""" + +import pytest + +from gn3.db.genotypes import load_genotype_samples + +@pytest.mark.unit_test +@pytest.mark.parametrize( + "genotype_filename,file_type,expected", ( + ("tests/unit/test_data/genotype.txt", "geno", ("BXD1","BXD2")),)) +def test_load_genotype_samples(genotype_filename, file_type, expected): + """Test that the genotype samples are loaded correctly""" + assert load_genotype_samples(genotype_filename, file_type) == expected -- cgit v1.2.3