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