File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def setUp(self):
49
49
50
50
class GetLineTestsGoodData (TempFile ):
51
51
# file_list = ['list\n', 'of\n', 'good\n', 'strings\n']
52
+ # test_list = file_list
52
53
53
54
def setUp (self ):
54
55
self .file_byte_string = '' .join (self .file_list ).encode ('utf-8' )
@@ -65,8 +66,7 @@ def test_getline(self):
65
66
66
67
def test_getlines (self ):
67
68
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 )
70
70
71
71
72
72
class GetLineTestsBadData (TempFile ):
@@ -88,10 +88,12 @@ class EmptyFile(GetLineTestsGoodData, unittest.TestCase):
88
88
89
89
class SingleEmptyLine (GetLineTestsGoodData , unittest .TestCase ):
90
90
file_list = ['\n ' ]
91
+ test_list = file_list
91
92
92
93
93
94
class GoodUnicode (GetLineTestsGoodData , unittest .TestCase ):
94
95
file_list = ['á\n ' , 'b\n ' , 'abcdef\n ' , 'ááááá\n ' ]
96
+ test_list = file_list
95
97
96
98
97
99
class BadUnicode (GetLineTestsBadData , unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments