1- "Test editor, coverage 53%."
1+ "Test editor, coverage approximately 53%."
22
33from idlelib import editor
44import unittest
@@ -260,6 +260,10 @@ class DeleteWantTest(unittest.TestCase):
260260 (13 , 4 , "abcde\t abd\t " ),
261261 (16 , 4 , "abcde\t abd\t \t " ),
262262 ]),
263+ ("\t abcd" , [
264+ (2 , 4 , "" ),
265+ (5 , 4 , "\t a" ),
266+ ]),
263267 ]
264268
265269 def mock_delete_trail_char_and_space (self , want , chars , tabwidth ):
@@ -279,7 +283,7 @@ def test_delete_trail_char_and_space(self):
279283 for dat in self .data :
280284 test_str = dat [0 ]
281285 for da in dat [1 ]:
282- with self .subTest (want = da [0 ], tabwidth = da [1 ], input = repr ( test_str ) ):
286+ with self .subTest (want = da [0 ], tabwidth = da [1 ], input = test_str ):
283287 res_str = ew .delete_trail_char_and_space (da [0 ], test_str , da [1 ])[1 ]
284288 self .assertEqual (res_str , da [2 ])
285289 time_new = time .time () - initial_time_new
@@ -290,7 +294,7 @@ def test_delete_trail_char_and_space(self):
290294 for dat in self .data :
291295 test_str = dat [0 ]
292296 for da in dat [1 ]:
293- with self .subTest (want = da [0 ], tabwidth = da [1 ], input = repr ( test_str ) ):
297+ with self .subTest (want = da [0 ], tabwidth = da [1 ], input = test_str ):
294298 res_str = ew .delete_trail_char_and_space (da [0 ], test_str , da [1 ])[1 ]
295299 self .assertEqual (res_str , da [2 ])
296300 time_old = time .time () - initial_time_old
0 commit comments