@@ -106,8 +106,8 @@ def test_diff_with_rename(self):
106106 diff = diffs [0 ]
107107 self .assertTrue (diff .renamed_file )
108108 self .assertTrue (diff .renamed )
109- self .assertEqual (diff .rename_from , u 'Jérôme' )
110- self .assertEqual (diff .rename_to , u 'müller' )
109+ self .assertEqual (diff .rename_from , 'Jérôme' )
110+ self .assertEqual (diff .rename_to , 'müller' )
111111 self .assertEqual (diff .raw_rename_from , b'J\xc3 \xa9 r\xc3 \xb4 me' )
112112 self .assertEqual (diff .raw_rename_to , b'm\xc3 \xbc ller' )
113113 assert isinstance (str (diff ), str )
@@ -133,8 +133,8 @@ def test_diff_with_copied_file(self):
133133
134134 diff = diffs [0 ]
135135 self .assertTrue (diff .copied_file )
136- self .assertTrue (diff .a_path , u 'test1.txt' )
137- self .assertTrue (diff .b_path , u 'test2.txt' )
136+ self .assertTrue (diff .a_path , 'test1.txt' )
137+ self .assertTrue (diff .b_path , 'test2.txt' )
138138 assert isinstance (str (diff ), str )
139139
140140 output = StringProcessAdapter (fixture ('diff_copied_mode_raw' ))
@@ -143,8 +143,8 @@ def test_diff_with_copied_file(self):
143143 diff = diffs [0 ]
144144 self .assertEqual (diff .change_type , 'C' )
145145 self .assertEqual (diff .score , 100 )
146- self .assertEqual (diff .a_path , u 'test1.txt' )
147- self .assertEqual (diff .b_path , u 'test2.txt' )
146+ self .assertEqual (diff .a_path , 'test1.txt' )
147+ self .assertEqual (diff .b_path , 'test2.txt' )
148148 self .assertEqual (len (list (diffs .iter_change_type ('C' ))), 1 )
149149
150150 def test_diff_with_change_in_type (self ):
@@ -237,29 +237,29 @@ def test_diff_unsafe_paths(self):
237237 res = Diff ._index_from_patch_format (None , output )
238238
239239 # The "Additions"
240- self .assertEqual (res [0 ].b_path , u 'path/ starting with a space' )
241- self .assertEqual (res [1 ].b_path , u 'path/"with-quotes"' )
242- self .assertEqual (res [2 ].b_path , u "path/'with-single-quotes'" )
243- self .assertEqual (res [3 ].b_path , u 'path/ending in a space ' )
244- self .assertEqual (res [4 ].b_path , u 'path/with\t tab' )
245- self .assertEqual (res [5 ].b_path , u 'path/with\n newline' )
246- self .assertEqual (res [6 ].b_path , u 'path/with spaces' )
247- self .assertEqual (res [7 ].b_path , u 'path/with-question-mark?' )
248- self .assertEqual (res [8 ].b_path , u 'path/¯\\ _(ツ)_|¯' )
249- self .assertEqual (res [9 ].b_path , u 'path/💩.txt' )
240+ self .assertEqual (res [0 ].b_path , 'path/ starting with a space' )
241+ self .assertEqual (res [1 ].b_path , 'path/"with-quotes"' )
242+ self .assertEqual (res [2 ].b_path , "path/'with-single-quotes'" )
243+ self .assertEqual (res [3 ].b_path , 'path/ending in a space ' )
244+ self .assertEqual (res [4 ].b_path , 'path/with\t tab' )
245+ self .assertEqual (res [5 ].b_path , 'path/with\n newline' )
246+ self .assertEqual (res [6 ].b_path , 'path/with spaces' )
247+ self .assertEqual (res [7 ].b_path , 'path/with-question-mark?' )
248+ self .assertEqual (res [8 ].b_path , 'path/¯\\ _(ツ)_|¯' )
249+ self .assertEqual (res [9 ].b_path , 'path/💩.txt' )
250250 self .assertEqual (res [9 ].b_rawpath , b'path/\xf0 \x9f \x92 \xa9 .txt' )
251- self .assertEqual (res [10 ].b_path , u 'path/�-invalid-unicode-path.txt' )
251+ self .assertEqual (res [10 ].b_path , 'path/�-invalid-unicode-path.txt' )
252252 self .assertEqual (res [10 ].b_rawpath , b'path/\x80 -invalid-unicode-path.txt' )
253253
254254 # The "Moves"
255255 # NOTE: The path prefixes a/ and b/ here are legit! We're actually
256256 # verifying that it's not "a/a/" that shows up, see the fixture data.
257- self .assertEqual (res [11 ].a_path , u 'a/with spaces' ) # NOTE: path a/ here legit!
258- self .assertEqual (res [11 ].b_path , u 'b/with some spaces' ) # NOTE: path b/ here legit!
259- self .assertEqual (res [12 ].a_path , u 'a/ending in a space ' )
260- self .assertEqual (res [12 ].b_path , u 'b/ending with space ' )
261- self .assertEqual (res [13 ].a_path , u 'a/"with-quotes"' )
262- self .assertEqual (res [13 ].b_path , u 'b/"with even more quotes"' )
257+ self .assertEqual (res [11 ].a_path , 'a/with spaces' ) # NOTE: path a/ here legit!
258+ self .assertEqual (res [11 ].b_path , 'b/with some spaces' ) # NOTE: path b/ here legit!
259+ self .assertEqual (res [12 ].a_path , 'a/ending in a space ' )
260+ self .assertEqual (res [12 ].b_path , 'b/ending with space ' )
261+ self .assertEqual (res [13 ].a_path , 'a/"with-quotes"' )
262+ self .assertEqual (res [13 ].b_path , 'b/"with even more quotes"' )
263263
264264 def test_diff_patch_format (self ):
265265 # test all of the 'old' format diffs for completness - it should at least
@@ -277,7 +277,7 @@ def test_diff_with_spaces(self):
277277 data = StringProcessAdapter (fixture ('diff_file_with_spaces' ))
278278 diff_index = Diff ._index_from_patch_format (self .rorepo , data )
279279 self .assertIsNone (diff_index [0 ].a_path , repr (diff_index [0 ].a_path ))
280- self .assertEqual (diff_index [0 ].b_path , u 'file with spaces' , repr (diff_index [0 ].b_path ))
280+ self .assertEqual (diff_index [0 ].b_path , 'file with spaces' , repr (diff_index [0 ].b_path ))
281281
282282 def test_diff_submodule (self ):
283283 """Test that diff is able to correctly diff commits that cover submodule changes"""
0 commit comments