aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-04 22:24:02 +0300
committerBonfaceKilz2021-05-05 12:26:04 +0300
commit31d447d5d70cf18a41c6e139a152fe4cfb864bb4 (patch)
treefeaf311d0f393b8ff6ad6f4e3981f2d8f4eca3d7 /wqflask
parent7b8ffda6de6be67736074d707015ed22a55d1185 (diff)
downloadgenenetwork2-31d447d5d70cf18a41c6e139a152fe4cfb864bb4.tar.gz
tests: test_species: Test that IndChromosome instantiates correctly
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/tests/unit/base/test_species.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/wqflask/tests/unit/base/test_species.py b/wqflask/tests/unit/base/test_species.py
index 950909a1..42aa9092 100644
--- a/wqflask/tests/unit/base/test_species.py
+++ b/wqflask/tests/unit/base/test_species.py
@@ -3,6 +3,7 @@
import unittest
from unittest import mock
from base.species import TheSpecies
+from base.species import IndChromosome
class TestTheSpecies(unittest.TestCase):
@@ -25,3 +26,14 @@ species_name is not provided."""
self.assertEqual(test_species.dataset, "random_dataset")
self.assertEqual(test_species.chromosomes, 1)
mock_chromosome.assert_called_once_with(dataset="random_dataset")
+
+
+class TestIndChromosome(unittest.TestCase):
+ """Tests for IndChromosome class"""
+
+ def test_create_ind_chromosome(self):
+ """Test that IndChromosome is instantiated correctly"""
+ test_ind_chromosome = IndChromosome(name="Test", length=10000000)
+ self.assertEqual(test_ind_chromosome.name, "Test")
+ self.assertEqual(test_ind_chromosome.length, 10000000)
+ self.assertEqual(test_ind_chromosome.mb_length, 10)