From 7783e4a9f5aae323b8eb56d35f1747a4a33c1e82 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Fri, 20 May 2022 14:54:45 +0200 Subject: [PATCH] MNT: remove `asynchronous=False` from runJavaScript calls --- glue_wwt/viewer/tests/test_wwt_widget.py | 2 +- glue_wwt/viewer/tools.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glue_wwt/viewer/tests/test_wwt_widget.py b/glue_wwt/viewer/tests/test_wwt_widget.py index 77f3afcc..654fa6d6 100644 --- a/glue_wwt/viewer/tests/test_wwt_widget.py +++ b/glue_wwt/viewer/tests/test_wwt_widget.py @@ -154,7 +154,7 @@ def test_remove_layer(self): assert subset_layer.wwt_layer is None # @pytest.mark.skipif(sys.platform == 'win32', reason="Test causes issues on Windows") - @pytest.mark.xfail(reason="'asynchronous' keyword unsupported by some JavaScript versions") + # @pytest.mark.xfail(reason="'asynchronous' keyword unsupported by some JavaScript versions") def test_save_tour(self, tmpdir): filename = tmpdir.join('mytour.wtt').strpath diff --git a/glue_wwt/viewer/tools.py b/glue_wwt/viewer/tools.py index c69b6584..407cb907 100644 --- a/glue_wwt/viewer/tools.py +++ b/glue_wwt/viewer/tools.py @@ -83,8 +83,8 @@ def activate(self): if not filename.endswith('.wtt'): filename = filename + '.wtt' - self.viewer._wwt.widget.page.runJavaScript("tourxml = '';", asynchronous=False) - tourxml = self.viewer._wwt.widget.page.runJavaScript('tourxml;', asynchronous=False) + self.viewer._wwt.widget.page.runJavaScript("tourxml = '';") + tourxml = self.viewer._wwt.widget.page.runJavaScript('tourxml;') self.viewer._wwt.widget.page.runJavaScript(SAVE_TOUR_CODE) @@ -93,7 +93,7 @@ def activate(self): while time.time() - start < 10: time.sleep(0.1) app.processEvents() - tourxml = self.viewer._wwt.widget.page.runJavaScript('tourxml;', asynchronous=False) + tourxml = self.viewer._wwt.widget.page.runJavaScript('tourxml;') if tourxml: break