Ejemplo n.º 1
0
 def test_second_none_input(self, mock_stdout):
     """
     Test if None input is correctly validated for second line
     """
     result = main.check_overlapping([10, 5], None)
     self.assertFalse(result)
     self.assertEqual(mock_stdout.getvalue(), 'First and second line must not be None\n')
Ejemplo n.º 2
0
 def test_not_overlap_negative(self):
     """
     Test two lines that must not overlap
     """
     result = main.check_overlapping([-1, -5], [-6, -8])
     self.assertFalse(result)
Ejemplo n.º 3
0
 def test_overlap_negative(self):
     """
     Test two lines that must overlap
     """
     result = main.check_overlapping([-5, -1], [-6, -2])
     self.assertTrue(result)
Ejemplo n.º 4
0
 def test_not_overlap(self):
     """
     Test two lines that must not overlap
     """
     result = main.check_overlapping([1, 5], [6, 8])
     self.assertFalse(result)
Ejemplo n.º 5
0
 def test_overlap(self):
     """
     Test two lines that must overlap
     """
     result = main.check_overlapping([1, 5], [2, 6])
     self.assertTrue(result)