From d58f6b1f6ef1d18734cb47bfc9ac679493cf75b3 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 21 Jun 2018 10:14:25 -0400 Subject: [PATCH] Fix loadPackage in tests --- test/conftest.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index 0a1548686..d081723b4 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -3,7 +3,6 @@ Various common utilities for testing. """ import pathlib -import time try: import pytest @@ -58,10 +57,9 @@ class SeleniumWrapper: def load_package(self, packages): self.run_js( - 'window.done = false\n' - 'pyodide.loadPackage({!r}).then(window.done = true)'.format( - packages)) - time.sleep(2) + 'window.done = false\n' + + 'pyodide.loadPackage({!r})'.format(packages) + + '.then(function() { window.done = true; })') self.wait.until(PackageLoaded()) @property