aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-02-21 16:21:31 +0300
committerFrederick Muriuki Muriithi2022-02-21 16:21:31 +0300
commitc84b07b8c5ac0a42c0fab929c75823b30b548191 (patch)
tree8c70ba6eeea9c113900f85836b906ba0a9b8f001 /tests
parentf914dc21577253f293b50b890ea0ac4bd2fd5d1b (diff)
downloadgenenetwork3-c84b07b8c5ac0a42c0fab929c75823b30b548191.tar.gz
Add test to ensure samples are read correctly from .geno files
* tests/unit/db/test_genotypes2.py: New file
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/db/test_genotypes2.py13
1 files changed, 13 insertions, 0 deletions
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