Commit 127f81fe authored by Michael Droettboom's avatar Michael Droettboom Committed by GitHub

Merge pull request #179 from rth/better-tracebacks

Simplify traceback on package load timeout
parents c75531db a711d059
...@@ -83,7 +83,7 @@ $(BUILD)/Makefile: $(BUILD)/.patched $(ZLIBBUILD)/.patched ...@@ -83,7 +83,7 @@ $(BUILD)/Makefile: $(BUILD)/.patched $(ZLIBBUILD)/.patched
cp config.site $(BUILD)/ cp config.site $(BUILD)/
( \ ( \
cd $(BUILD); \ cd $(BUILD); \
CONFIG_SITE=./config.site READELF=true emconfigure ./configure --without-threads --without-pymalloc --disable-shared --disable-ipv6 --without-gcc --host=asmjs-unknown-emscripten --build=$(shell $(BUILD)/config.guess) --prefix=$(INSTALL) ; \ CONFIG_SITE=./config.site READELF=true emconfigure ./configure --without-pymalloc --disable-shared --disable-ipv6 --without-gcc --host=asmjs-unknown-emscripten --build=$(shell $(BUILD)/config.guess) --prefix=$(INSTALL) ; \
) )
......
...@@ -102,17 +102,19 @@ class SeleniumWrapper: ...@@ -102,17 +102,19 @@ class SeleniumWrapper:
'window.done = false\n' + 'window.done = false\n' +
'pyodide.loadPackage({!r})'.format(packages) + 'pyodide.loadPackage({!r})'.format(packages) +
'.finally(function() { window.done = true; })') '.finally(function() { window.done = true; })')
__tracebackhide__ = True
self.wait_until_packages_loaded() self.wait_until_packages_loaded()
def wait_until_packages_loaded(self): def wait_until_packages_loaded(self):
from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import TimeoutException
__tracebackhide__ = True
try: try:
self.wait.until(PackageLoaded()) self.wait.until(PackageLoaded())
except TimeoutException as exc: except TimeoutException as exc:
_display_driver_logs(self.browser, self.driver) _display_driver_logs(self.browser, self.driver)
print(self.logs) print(self.logs)
raise TimeoutException() raise TimeoutException('wait_until_packages_loaded timed out')
@property @property
def urls(self): def urls(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment