-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added samples as a module to conftest
- Loading branch information
Sri Tikkireddy
committed
Sep 17, 2024
1 parent
b17590c
commit 63c085c
Showing
4 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
|
||
def add_samples_to_path(): | ||
samples_dir = str(Path(__file__).parent / "samples") | ||
|
||
if samples_dir not in sys.path: | ||
sys.path.append(samples_dir) | ||
|
||
if "PYTHONPATH" in os.environ: | ||
os.environ["PYTHONPATH"] = f"{os.environ['PYTHONPATH']}:{samples_dir}" | ||
else: | ||
os.environ["PYTHONPATH"] = samples_dir | ||
|
||
|
||
def pytest_sessionstart(session): | ||
add_samples_to_path() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.