Reputation: 23
I have written several tests in pytest. For one of them I need to run the following command in terminal :
PATH="$(pwd)/testing/scripting:$PATH"
Since I want to run the tests in different machines I wanted to automate this process.
Upvotes: 0
Views: 1047
Reputation: 120401
Maybe you can use conftest.py
Something like below:
import os
def pytest_sessionstart(session):
path = os.path.join(os.getcwd(), 'testing/scripting')
os.environ['PATH'] = path + os.pathsep + os.environ['PATH']
Upvotes: 1