Skip to content
Snippets Groups Projects
Commit ca69875a authored by Ben Gamari's avatar Ben Gamari
Browse files

testsuite: Fix Windows platform test

Previously we used platform.system() and while this worked fine (e.g.
returned `Windows`, as expected) locally under both msys and MingW64
Python distributions, it inexplicably returned `MINGW64_NT-10.0`
under MingW64 Python on CI. It seems os.name is more reliable so we now
use that instead..
parent 196eec1a
No related branches found
No related tags found
No related merge requests found
......@@ -87,8 +87,8 @@ def testing_metrics():
# are forced to just copy instead.
#
# We define the following function to make this magic more
# explicit/discoverable. You are enouraged to use it instead of os.symlink.
if platform.system() == 'Windows' and os.getenv('FORCE_SYMLINKS') == None:
# explicit/discoverable. You are encouraged to use it instead of os.symlink.
if os.name == 'nt' and os.getenv('FORCE_SYMLINKS') == None:
def link_or_copy_file(src: Path, dst: Path):
shutil.copyfile(str(src), str(dst))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment