Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

fix a bug where a test would not be closed if it had no results #153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pytest_testrail/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ def pytest_sessionfinish(self, session, exitstatus):
else:
print('[{}] No data published'.format(TESTRAIL_PREFIX))

if self.close_on_complete and self.testrun_id:
self.close_test_run(self.testrun_id)
elif self.close_on_complete and self.testplan_id:
self.close_test_plan(self.testplan_id)
if self.close_on_complete and self.testrun_id:
self.close_test_run(self.testrun_id)
elif self.close_on_complete and self.testplan_id:
self.close_test_plan(self.testplan_id)
print('[{}] End publishing'.format(TESTRAIL_PREFIX))

# plugin
Expand Down