Skip to content

Commit

Permalink
[test] Prefer shutil.copy over shutil.copyfile. NFC (#22652)
Browse files Browse the repository at this point in the history
The former is more flexible as it allows the target to be a directory
name.

Also remove some unnecessary use of `self.in_dir`.
  • Loading branch information
sbc100 authored Sep 30, 2024
1 parent e240071 commit 08a1472
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 139 deletions.
2 changes: 1 addition & 1 deletion test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ def make_reftest(self, expected, manually_trigger=False):
# make sure the pngs used here have no color correction, using e.g.
# pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB infile outfile
reporting = read_file(test_file('browser_reporting.js'))
shutil.copyfile(expected, 'expected.png')
shutil.copy(expected, 'expected.png')
create_file('reftest.js', '''
function doReftest() {
if (doReftest.done) return;
Expand Down
Loading

0 comments on commit 08a1472

Please sign in to comment.