コード例 #1
0
 def test_known_failure(self):
     """
     lucky_sevens will fail with a known list that returns False
     """
     result = main.lucky_sevens(numbers=[1,1,1])
     self.assertFalse(result)
コード例 #2
0
 def test_returns_true_or_false(self):
     """
     lucky_sevens should fail if it doesn't return True or False.
     """
     result = main.lucky_sevens(numbers=[1,1,1])
     self.assertIsInstance(result, bool)
コード例 #3
0
 def test_known_result(self):
     """
     lucky_sevens will pass with a known list that returns True
     """
     result = main.lucky_sevens(numbers=[2,2,3])
     self.assertTrue(result)