Skip to content

Commit

Permalink
Rename StopTestApp -> StopAppTest to reflect the original class better.
Browse files Browse the repository at this point in the history
  • Loading branch information
befeleme committed Mar 23, 2021
1 parent 34b4f7e commit 0723596
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebook/tests/test_notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_notebook_password():
assert nb.password != ''
passwd_check(nb.password, password)

class StopTestApp(notebookapp.NbserverStopApp):
class StopAppTest(notebookapp.NbserverStopApp):
"""For testing the logic of NbserverStopApp."""
def __init__(self, **kwargs):
super().__init__(**kwargs)
Expand Down Expand Up @@ -166,15 +166,15 @@ def list_running_servers(runtime_dir):

# test stop with a match
with mock_servers:
app = StopTestApp()
app = StopAppTest()
app.initialize(['105'])
app.start()
assert len(app.servers_shut_down) == 1
assert app.servers_shut_down[0]['port'] == 105

# test no match
with mock_servers, patch('os.kill') as os_kill:
app = StopTestApp()
app = StopAppTest()
app.initialize(['999'])
with pytest.raises(SystemExit) as exc:
app.start()
Expand Down

0 comments on commit 0723596

Please sign in to comment.