Skip to content

Commit

Permalink
MNT: remove asynchronous=False from runJavaScript calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier committed May 20, 2022
1 parent 608d879 commit 7783e4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion glue_wwt/viewer/tests/test_wwt_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions glue_wwt/viewer/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down

0 comments on commit 7783e4a

Please sign in to comment.