Пример #1
0
 def test_get_amount_of_magic_numbers_with_unique_values(self):
     magic = Magic([(-2299, 2300), (-2300, 2300), (-2301, 2300)])
     self.assertEqual(15, magic.amount)
Пример #2
0
 def test_get_amount_of_magic_numbers_from_high_begining(self):
     magic = Magic([(2809, 2810)])
     self.assertEqual(1, magic.amount)
Пример #3
0
 def test_get_amount_of_magic_numbers_with_more_than_one_interval(self):
     magic = Magic([(-2300, 0), (0, 2300)])
     self.assertEqual(15, magic.amount)
Пример #4
0
 def test_get_amount_of_magic_numbers(self):
     magic = Magic([(-2300, 2300)])
     self.assertEqual(15, magic.amount)
Пример #5
0
 def test_get_magic_numbers_with_unique_values(self):
     magic = Magic([(8, 27), (7, 27), (9, 27)])
     self.assertEqual({9, 25}, magic.numbers)
Пример #6
0
 def test_get_magic_numbers_with_more_than_one_interval(self):
     magic = Magic([(8, 27), (49, 49)])
     self.assertEqual({9, 25, 49}, magic.numbers)
Пример #7
0
 def test_get_magic_numbers_from_high_begining(self):
     magic = Magic([(2809, 2810)])
     self.assertEqual({2809}, magic.numbers)
Пример #8
0
 def test_get_magic_numbers(self):
     magic = Magic([(0, 50)])
     self.assertEqual({4, 9, 25, 49}, magic.numbers)