Skip to content

Commit ee60bd8

Browse files
committed
fixup test
1 parent 43431c4 commit ee60bd8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_linecache.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def setUp(self):
4949

5050
class GetLineTestsGoodData(TempFile):
5151
# file_list = ['list\n', 'of\n', 'good\n', 'strings\n']
52+
# test_list = file_list
5253

5354
def setUp(self):
5455
self.file_byte_string = ''.join(self.file_list).encode('utf-8')
@@ -65,8 +66,7 @@ def test_getline(self):
6566

6667
def test_getlines(self):
6768
lines = linecache.getlines(self.file_name)
68-
test_lines = getattr(self, 'test_list', self.file_list)
69-
self.assertEqual(lines, test_lines)
69+
self.assertEqual(lines, self.test_list)
7070

7171

7272
class GetLineTestsBadData(TempFile):
@@ -88,10 +88,12 @@ class EmptyFile(GetLineTestsGoodData, unittest.TestCase):
8888

8989
class SingleEmptyLine(GetLineTestsGoodData, unittest.TestCase):
9090
file_list = ['\n']
91+
test_list = file_list
9192

9293

9394
class GoodUnicode(GetLineTestsGoodData, unittest.TestCase):
9495
file_list = [\n', 'b\n', 'abcdef\n', 'ááááá\n']
96+
test_list = file_list
9597

9698

9799
class BadUnicode(GetLineTestsBadData, unittest.TestCase):

0 commit comments

Comments
 (0)