Commit d58f6b1f authored by Michael Droettboom's avatar Michael Droettboom

Fix loadPackage in tests

parent 2067c1c3
...@@ -3,7 +3,6 @@ Various common utilities for testing. ...@@ -3,7 +3,6 @@ Various common utilities for testing.
""" """
import pathlib import pathlib
import time
try: try:
import pytest import pytest
...@@ -58,10 +57,9 @@ class SeleniumWrapper: ...@@ -58,10 +57,9 @@ class SeleniumWrapper:
def load_package(self, packages): def load_package(self, packages):
self.run_js( self.run_js(
'window.done = false\n' 'window.done = false\n' +
'pyodide.loadPackage({!r}).then(window.done = true)'.format( 'pyodide.loadPackage({!r})'.format(packages) +
packages)) '.then(function() { window.done = true; })')
time.sleep(2)
self.wait.until(PackageLoaded()) self.wait.until(PackageLoaded())
@property @property
......
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