# Create a file containing import os, pathlib import pytest os.chdir( pathlib.Path.cwd() / 'Tests' ) pytest.main() # And use the command `python tests.py` to run it.