def test_empty_span(self): self.assertEqual((4, 7), formatting.line_expanded_span('012\n456\n890\n', 5, 4)) self.assertEqual((4, 7), formatting.line_expanded_span('012\n456\n890\n', 5, 5))
def test_line_overlap_span(self): self.assertEqual((0, 11), formatting.line_expanded_span('012\n456\n890\n', 3, 9))
def test_noop(self): self.assertEqual((4, 7), formatting.line_expanded_span('012\n456\n890\n', 4, 7))
def test_line_end(self): self.assertEqual((4, 11), formatting.line_expanded_span('012\n456\n890\n', 7, 8))
def test_line_start_2(self): self.assertEqual((4, 7), formatting.line_expanded_span('012\n456\n890\n', 4, 4))
def test_string_end(self): self.assertEqual((8, 11), formatting.line_expanded_span('012\n456\n890\n', 9, 10))
def test_string_start(self): self.assertEqual((0, 3), formatting.line_expanded_span('012\n456\n890\n', 1, 2))
def test_line_subset_(self): self.assertEqual((4, 7), formatting.line_expanded_span('012\n456\n890\n', 5, 6))
def test_negative(self): self.assertEqual((8, 11), formatting.line_expanded_span('012\n456\n890\n', -2, -1))
def test_none(self): self.assertEqual((0, 12), formatting.line_expanded_span('012\n456\n890\n', None, None))