Skip to content

Commit

Permalink
check if driver is inited in main conftest finally block
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-c-at-moz committed Jul 19, 2024
1 parent dda060e commit 1ebda0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def driver(
yield driver

finally:
driver.quit()
if "driver" in locals() or "driver" in globals():
driver.quit()


@pytest.fixture()
Expand Down

0 comments on commit 1ebda0a

Please sign in to comment.