Skip to content

Commit

Permalink
Testing: Fix tests in Appveyor/Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Nov 18, 2018
1 parent e254fc3 commit ecf2025
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion spyder/plugins/onlinehelp/tests/test_pydocgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
def pydocbrowser(qtbot):
"""Set up pydocbrowser."""
widget = PydocBrowser(None)
widget.start_server()
qtbot.addWidget(widget)
return widget

Expand Down
7 changes: 4 additions & 3 deletions spyder/plugins/onlinehelp/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def completer(self):
def quit_server(self):
if PY3:
# Python 3
if self.server and self.server.serving:
if self.is_server_running() and self.server.serving:
self.server.stop()
else:
# Python 2
if self.server:
if self.is_server_running():
self.server.quit = 1


Expand Down Expand Up @@ -94,7 +94,8 @@ def is_server_running(self):
return self.server is not None

def closeEvent(self, event):
self.server.quit_server()
if self.is_server_running():
self.server.quit_server()
# while not self.server.complete: #XXX Is it really necessary?
# pass
event.accept()
Expand Down

0 comments on commit ecf2025

Please sign in to comment.