From 31d447d5d70cf18a41c6e139a152fe4cfb864bb4 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 4 May 2021 22:24:02 +0300 Subject: tests: test_species: Test that IndChromosome instantiates correctly --- wqflask/tests/unit/base/test_species.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'wqflask/tests/unit') 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) -- cgit v1.2.3