Skip to content

Commit

Permalink
I wonder if this will work
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuald committed Jan 17, 2024
1 parent 43dafd9 commit 81d9566
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os
import sys

if sys.platform == "darwin":
import atexit

atexit.register(lambda: os.kill(os.getpid(), 9))
11 changes: 6 additions & 5 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import subprocess

if __name__ == "__main__":
# CTRE's library tends to crash on OSX at program exit, so
# don't bother running the tests in CI
if sys.platform != "darwin":
root = abspath(dirname(__file__))
os.chdir(root)
root = abspath(dirname(__file__))
os.chdir(root)

try:
subprocess.check_call([sys.executable, "-m", "pytest"])
except subprocess.CalledProcessError as e:
if not (sys.platform == "darwin" and e.returncode == 137):
raise

0 comments on commit 81d9566

Please sign in to comment.