예제 #1
0
 def test_is_even(self):
     answer0 = logic.is_even(5)
     self.assertEqual(answer0, 0)
     answer1 = logic.is_even(8)
     self.assertEqual(answer1, 1)
     answer2 = logic.is_even(0)
     self.assertEqual(answer2, 1)
예제 #2
0
    def test_case(self):
        # Add code here.
        self.assertEqual(logic.is_even(2), True)
        self.assertEqual(logic.is_even(5), False)
        self.assertEqual(logic.is_even(6), True)

        self.assertEqual(logic.in_an_interval(-10), False)
        self.assertEqual(logic.in_an_interval(0), True)
        self.assertEqual(logic.in_an_interval(9), False)
        self.assertEqual(logic.in_an_interval(20), True)
        self.assertEqual(logic.in_an_interval(120), True)
        self.assertEqual(logic.in_an_interval(127), True)
예제 #3
0
 def test_is_even(self):
     self.assertTrue(logic.is_even(10), True)
     self.assertFalse(logic.is_even(3), False)
     self.assertTrue(logic.is_even(4), True)
예제 #4
0
 def test_case_2(self):
    remainder = logic.is_even(5)
    self.assertFalse(remainder == 0)
예제 #5
0
 def test_case_1(self):
    remainder = logic.is_even(4)
    self.assertTrue(remainder == 0)
예제 #6
0
 def test_is_even2(self):
     self.assertTrue(logic.is_even(44.0))
예제 #7
0
 def test_is_even1(self):
    self.assertTrue(logic.is_even(4))
예제 #8
0
 def test_is_even(self):
     self.assertTrue(logic.is_even(6))
예제 #9
0
 def test_is_even(self):
     self.assertTrue(logic.is_even(6))
     self.assertFalse(logic.is_even(7))
     self.assertFalse(logic.is_even(23455))
     self.assertTrue(logic.is_even(0))
예제 #10
0
 def test_is_even_1(self):
     self.assertTrue(logic.is_even(2))
     self.assertFalse(logic.is_even(3))
예제 #11
0
 def test_case1(self):
     self.assertEqual(logic.is_even(3), False)
예제 #12
0
 def test_case(self):
     self.assertEqual(logic.is_even(4), True)
예제 #13
0
 def test_case_is_even_2(self):
     self.assertFalse(logic.is_even(3))
예제 #14
0
 def test_case_is_even_1(self):
     self.assertTrue(logic.is_even(4))
예제 #15
0
 def test_is_even2(self):
    self.assertFalse(logic.is_even(81))
예제 #16
0
 def test_is_even3(self):
     self.assertFalse(logic.is_even(9))
예제 #17
0
 def test_is_even4(self):
     self.assertFalse(logic.is_even(9.0))
예제 #18
0
 def test_is_even2(self):
     self.assertFalse(logic.is_even(5))
예제 #19
0
 def test_is_even1(self):
     self.assertTrue(logic.is_even(44))
예제 #20
0
 def test_case(self):
    self.assertTrue(logic.is_even(4))
    self.assertFalse(logic.is_even(3))
    self.assertTrue(logic.is_even(-2))
    self.assertFalse(logic.is_even(301))
예제 #21
0
 def test_case(self):
     self.assertTrue(logic.is_even(2))