Skip to content

Commit a0ab1ae

Browse files
committed
Adapt test_apply_patch
1 parent 1b74cbf commit a0ab1ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/framework/filetools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,7 @@ def test_apply_patch(self):
18941894
for with_backup in (True, False):
18951895
update_build_option('backup_patched_files', with_backup)
18961896
self.assertTrue(ft.apply_patch(toy_patch, path))
1897-
src_file = os.path.join(path, 'toy-0.0', 'toy.source')
1897+
src_file = os.path.join(path, 'toy.source')
18981898
backup_file = src_file + '.orig'
18991899
patched = ft.read_file(src_file)
19001900
pattern = "I'm a toy, and very proud of it"
@@ -1911,7 +1911,7 @@ def test_apply_patch(self):
19111911
toy_patch_gz = os.path.join(testdir, 'sandbox', 'sources', 'toy', 'toy-0.0_gzip.patch.gz')
19121912
with self.mocked_stdout_stderr():
19131913
self.assertTrue(ft.apply_patch(toy_patch_gz, path))
1914-
patched_gz = ft.read_file(os.path.join(path, 'toy-0.0', 'toy.source'))
1914+
patched_gz = ft.read_file(os.path.join(path, 'toy.source'))
19151915
pattern = "I'm a toy, and very very proud of it"
19161916
self.assertIn(pattern, patched_gz)
19171917

@@ -1922,7 +1922,7 @@ def test_apply_patch(self):
19221922
with self.mocked_stdout_stderr():
19231923
ft.apply_patch(toy_patch_gz, path, options=' --reverse')
19241924
# Change was really removed
1925-
self.assertNotIn(pattern, ft.read_file(os.path.join(path, 'toy-0.0', 'toy.source')))
1925+
self.assertNotIn(pattern, ft.read_file(os.path.join(path, 'toy.source')))
19261926

19271927
# test copying of files, both to an existing directory and a non-existing location
19281928
test_file = os.path.join(self.test_prefix, 'foo.txt')

0 commit comments

Comments
 (0)