Files
neotest-python/neotest.py
T
Salomon PoppandItai Bohadana b720009f3e fix: propagate exit code (#108)
* fix(pytest): propagate exit code

* feat: derive exit code for unittest
2026-08-18 16:39:57 +03:00

21 lines
372 B
Python

from contextlib import contextmanager
import sys
from pathlib import Path
@contextmanager
def add_to_path():
old_path = sys.path[:]
sys.path.insert(0, str(Path(__file__).parent))
try:
yield
finally:
sys.path = old_path
with add_to_path():
from neotest_python import main
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))