fix broken Windows tests

This commit is contained in:
Damien Elmes 2022-02-11 19:46:38 +10:00
parent a8939e7938
commit 6ab221bda5
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,6 @@
# Copyright: Ankitects Pty Ltd and contributors # Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import fcntl
import os import os
import subprocess import subprocess
import sys import sys
@ -12,6 +11,8 @@ if __name__ == "__main__":
fix = len(sys.argv) > 2 fix = len(sys.argv) > 2
if sys.platform == "linux": if sys.platform == "linux":
import fcntl
file = open("/tmp/anki-black", "w") file = open("/tmp/anki-black", "w")
fcntl.lockf(file, fcntl.LOCK_EX) fcntl.lockf(file, fcntl.LOCK_EX)

View file

@ -1,7 +1,6 @@
# Copyright: Ankitects Pty Ltd and contributors # Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import fcntl
import os import os
import subprocess import subprocess
import sys import sys
@ -12,6 +11,8 @@ if __name__ == "__main__":
fix = len(sys.argv) > 2 fix = len(sys.argv) > 2
if sys.platform == "linux": if sys.platform == "linux":
import fcntl
file = open("/tmp/anki-black", "w") file = open("/tmp/anki-black", "w")
fcntl.lockf(file, fcntl.LOCK_EX) fcntl.lockf(file, fcntl.LOCK_EX)