Commit e35fe8d5 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot
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 is more reliable so we now
use that instead..
parent 34bc02c7
Pipeline #14323 failed with stages
in 681 minutes and 36 seconds
import os
import platform
import subprocess
import shutil
from pathlib import Path, PurePath
......@@ -83,7 +82,7 @@ def testing_metrics():
# We define the following function to make this magic more
# explicit/discoverable. You are encouraged to use it instead of os.symlink.
if platform.system() == 'Windows' and os.getenv('FORCE_SYMLINKS') == None:
if == 'nt' and os.getenv('FORCE_SYMLINKS') == None:
def link_or_copy_file(src: Path, dst: Path):
shutil.copyfile(str(src), str(dst))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment