fix some tests after renaming method
This commit is contained in:
@@ -2,6 +2,7 @@ import unittest
|
||||
import unicodedata
|
||||
from line import Line
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_column_to_char(self):
|
||||
byte_offset = 123
|
||||
@@ -82,14 +83,14 @@ class MyTestCase(unittest.TestCase):
|
||||
text = "\ta\tb" # will be rendered as: ....abc where . represents a whitespace column
|
||||
expected = " a b"
|
||||
line = Line(byte_offset=byte_offset, byte_end=byte_offset + len(text.encode("utf8")), line=text)
|
||||
self.assertEqual(expected, line.line_tabs_replaced())
|
||||
self.assertEqual(expected, line.line_prepared_for_display())
|
||||
|
||||
def test_line_tabs_replaced_performance(self):
|
||||
byte_offset = 123
|
||||
text = "a\t" * 10000
|
||||
expected = "a " * 10000
|
||||
line = Line(byte_offset=byte_offset, byte_end=byte_offset + len(text.encode("utf8")), line=text)
|
||||
self.assertEqual(expected, line.line_tabs_replaced())
|
||||
self.assertEqual(expected, line.line_prepared_for_display())
|
||||
|
||||
def test_byte_index_to_char_index(self):
|
||||
byte_offset = 123
|
||||
|
||||
Reference in New Issue
Block a user