Skip to content

Commit

Permalink
Modified pytest exit code
Browse files Browse the repository at this point in the history
Signed-off-by: jitendracandela <[email protected]>
  • Loading branch information
jitendracandela committed Oct 18, 2024
1 parent a4a6f3f commit 4cbc27b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,8 @@ def collect_logs():
query="?logType=2")
allure.attach(body=json.dumps(resp.json(), indent=4), name="all_device_reboot_logs\n",
attachment_type=allure.attachment_type.JSON)
try:
pytest.fail("AP crashed during the test")
logging.info("AP crashed during the test")
except Exception as e:
logging.info("In the crash exception:- " + str(e))
pytest.exit(1)
logging.info("AP crashed during the test")
pytest.exit("AP crashed during the test", 2)
else:
logging.info("resp.status_code:- " + str(resp.status_code))

Expand Down

0 comments on commit 4cbc27b

Please sign in to comment.