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')
def test_not_overlap_negative(self): """ Test two lines that must not overlap """ result = main.check_overlapping([-1, -5], [-6, -8]) self.assertFalse(result)
def test_overlap_negative(self): """ Test two lines that must overlap """ result = main.check_overlapping([-5, -1], [-6, -2]) self.assertTrue(result)
def test_not_overlap(self): """ Test two lines that must not overlap """ result = main.check_overlapping([1, 5], [6, 8]) self.assertFalse(result)
def test_overlap(self): """ Test two lines that must overlap """ result = main.check_overlapping([1, 5], [2, 6]) self.assertTrue(result)