Use patlib.Path in tests and tools
This commit is contained in:
+2
-1
@@ -3,10 +3,11 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
if __name__ == '__main__':
|
||||
# move cwd to the project root
|
||||
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
os.chdir(Path(__file__).resolve().parents[1])
|
||||
|
||||
# run the unit tests
|
||||
subprocess.check_call([sys.executable, '-m', 'pytest', 'unit_test'])
|
||||
|
||||
Reference in New Issue
Block a user