From 6feb0d7401e350e5573f8daf960d8b156a282707 Mon Sep 17 00:00:00 2001 From: coolreader18 <33094578+coolreader18@users.noreply.github.com> Date: Sun, 12 Jan 2020 21:57:58 -0600 Subject: [PATCH] Fix contest --- wasm/tests/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wasm/tests/conftest.py b/wasm/tests/conftest.py index a84dcaffa..ecb5b0007 100644 --- a/wasm/tests/conftest.py +++ b/wasm/tests/conftest.py @@ -4,6 +4,7 @@ import time import socket import atexit import pytest +import sys PORT = 8080 @@ -73,11 +74,11 @@ from selenium.common.exceptions import JavascriptException class Driver(webdriver.Firefox): def _print_panic(self): - stack = driver.execute_script( + stack = self.execute_script( "return (window.__RUSTPYTHON_ERROR_MSG || '') + '\\n' + (window.__RUSTPYTHON_ERROR_STACK || '')" ) if stack.strip(): - print(f"RustPython panic stack:\n{stack}", file=sys.stderr) + print(f"RustPython panic stack:", stack, file=sys.stderr, sep="\n") def execute_script(self, *args, **kwargs): try: