Skip to content

Commit 323d394

Browse files
authored
fix testplan.json when path present in env variable but not exists on disk (via #564)
1 parent 27bf63c commit 323d394

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

allure-python-commons/src/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def get_testplan():
395395
planned_tests = []
396396
file_path = os.environ.get("ALLURE_TESTPLAN_PATH")
397397

398-
if file_path:
398+
if file_path and os.path.exists(file_path):
399399
with open(file_path, 'r') as plan_file:
400400
plan = json.load(plan_file)
401401
planned_tests = plan.get("tests", [])

0 commit comments

Comments
 (0)