Skip to content

Commit edf6760

Browse files
committed
Adapt test_apply_patch
1 parent ca5e4d4 commit edf6760

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
@@ -1898,7 +1898,7 @@ def test_apply_patch(self):
18981898
for with_backup in (True, False):
18991899
update_build_option('backup_patched_files', with_backup)
19001900
self.assertTrue(ft.apply_patch(toy_patch, path))
1901-
src_file = os.path.join(path, 'toy-0.0', 'toy.source')
1901+
src_file = os.path.join(path, 'toy.source')
19021902
backup_file = src_file + '.orig'
19031903
patched = ft.read_file(src_file)
19041904
pattern = "I'm a toy, and very proud of it"
@@ -1915,7 +1915,7 @@ def test_apply_patch(self):
19151915
toy_patch_gz = os.path.join(testdir, 'sandbox', 'sources', 'toy', 'toy-0.0_gzip.patch.gz')
19161916
with self.mocked_stdout_stderr():
19171917
self.assertTrue(ft.apply_patch(toy_patch_gz, path))
1918-
patched_gz = ft.read_file(os.path.join(path, 'toy-0.0', 'toy.source'))
1918+
patched_gz = ft.read_file(os.path.join(path, 'toy.source'))
19191919
pattern = "I'm a toy, and very very proud of it"
19201920
self.assertIn(pattern, patched_gz)
19211921

@@ -1926,7 +1926,7 @@ def test_apply_patch(self):
19261926
with self.mocked_stdout_stderr():
19271927
ft.apply_patch(toy_patch_gz, path, options=' --reverse')
19281928
# Change was really removed
1929-
self.assertNotIn(pattern, ft.read_file(os.path.join(path, 'toy-0.0', 'toy.source')))
1929+
self.assertNotIn(pattern, ft.read_file(os.path.join(path, 'toy.source')))
19301930

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

0 commit comments

Comments
 (0)