예제 #1
0
 def test_returns_valid_genomes(self):
     """
     Checks the genomes returned by the create_population function are
     of the correct type.
     """
     result = create_population(1, TARGET_WORD)
     self.assertEqual(Genome, type(result[0]))
예제 #2
0
파일: test_words.py 프로젝트: GitBruno/foox
 def test_returns_valid_genomes(self):
     """
     Checks the genomes returned by the create_population function are
     of the correct type.
     """
     result = create_population(1, TARGET_WORD)
     self.assertEqual(Genome, type(result[0]))
예제 #3
0
 def test_returns_correct_number_of_genomes(self):
     """
     Ensures the correct number of genomes are returned by the function.
     """
     result = create_population(100, TARGET_WORD)
     self.assertEqual(100, len(result))
예제 #4
0
파일: test_words.py 프로젝트: GitBruno/foox
 def test_returns_correct_number_of_genomes(self):
     """
     Ensures the correct number of genomes are returned by the function.
     """
     result = create_population(100, TARGET_WORD)
     self.assertEqual(100, len(result))