We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc84287 commit d18100bCopy full SHA for d18100b
test/framework/filetools.py
@@ -926,14 +926,16 @@ def test_back_up_file(self):
926
self.assertEqual(ft.read_file(fp), new_txt)
927
928
# check whether strip_fn works as expected
929
- fp2 = fp + '.lua'
+ fp2 = fp + 'a.lua'
930
ft.copy_file(fp, fp2)
931
res = ft.back_up_file(fp2)
932
self.assertTrue(fp2.endswith('.lua'))
933
self.assertTrue('.lua' in os.path.basename(res))
934
935
res = ft.back_up_file(fp2, strip_fn='.lua')
936
self.assertFalse('.lua' in os.path.basename(res))
937
+ # strip_fn should not remove the first a in 'a.lua'
938
+ self.assertTrue(res.startswith(fp + 'a.bak_'))
939
940
def test_move_logs(self):
941
"""Test move_logs function."""
0 commit comments