Skip to content

Commit 60f60f4

Browse files
committed
funcrags get
1 parent 5eeb973 commit 60f60f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

conftest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ def pytest_exception_interact(node, call, report):
6565
try:
6666
test_name = node.name
6767
logging.info(f"Handling exception for test: {test_name}")
68-
print(f"NODE LOGS HERE {node.funcargs}\n THE FAILED TEST: {test_name}", file=sys.stderr)
69-
driver = node.funcargs["driver"]
70-
opt_ci = node.funcargs["opt_ci"]
68+
print(
69+
f"NODE LOGS HERE {node.funcargs}\n THE FAILED TEST: {test_name}",
70+
file=sys.stderr,
71+
)
72+
driver = node.funcargs.get("driver")
73+
opt_ci = node.funcargs.get("opt_ci")
7174
if driver:
7275
log_content(opt_ci, driver, test_name)
7376
screenshot_content(driver, opt_ci, test_name)

0 commit comments

Comments
 (0)