Sha256: 68853b5d84fc60d4c7e1c0a2911a454bac5ca54851727397e9952ea398b4cfd4
Contents?: true
Size: 1.06 KB
Versions: 237
Compression:
Stored size: 1.06 KB
Contents
import unittest from perfect_numbers import is_perfect class PerfectNumbersTest(unittest.TestCase): def test_first_perfect_number(self): self.assertTrue(is_perfect(6)) def test_no_perfect_number(self): self.assertFalse(is_perfect(8)) def test_second_perfect_number(self): self.assertTrue(is_perfect(28)) def test_abundant(self): self.assertFalse(is_perfect(20)) def test_answer_to_the_ultimate_question_of_life(self): self.assertFalse(is_perfect(42)) def test_third_perfect_number(self): self.assertTrue(is_perfect(496)) def test_odd_abundant(self): self.assertFalse(is_perfect(945)) def test_fourth_perfect_number(self): self.assertTrue(is_perfect(8128)) def test_fifth_perfect_number(self): self.assertTrue(is_perfect(33550336)) def test_sixth_perfect_number(self): self.assertTrue(is_perfect(8589869056)) def test_seventh_perfect_number(self): self.assertTrue(is_perfect(137438691328)) if __name__ == '__main__': unittest.main()
Version data entries
237 entries across 237 versions & 1 rubygems