Skip to content

Commit 26efa1b

Browse files
authored
Merge pull request #331 from farisachugthai/imports
Remove a few more unused imports
2 parents b76acb8 + 27fbb5b commit 26efa1b

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

tests/test_config_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import json
22
import os
3-
import shutil
4-
import tempfile
53

64
from jupyter_server.config_manager import BaseJSONConfigManager
75

tests/test_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,4 @@ async def test_old_files_redirect(fetch, serverapp, root_dir):
171171
# r = self.request('GET', 'files/test.txt?download=1')
172172
# disposition = r.headers.get('Content-Disposition', '')
173173
# self.assertIn('attachment', disposition)
174-
# self.assertIn("filename*=utf-8''test.txt", disposition)
174+
# self.assertIn("filename*=utf-8''test.txt", disposition)

tests/test_serverapp.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
21
import os
32
import getpass
4-
import pathlib
53
import pytest
64
import logging
7-
85
from unittest.mock import patch
96

10-
117
from traitlets import TraitError
128
from traitlets.tests.utils import check_help_all_output
13-
149
from jupyter_core.application import NoStart
1510

16-
1711
from jupyter_server.serverapp import (
18-
ServerApp,
12+
ServerApp,
1913
list_running_servers,
2014
JupyterPasswordApp,
2115
JupyterServerStopApp
@@ -35,12 +29,12 @@ def test_server_info_file(tmp_path, configurable_serverapp):
3529
servers = list(list_running_servers(app.runtime_dir))
3630

3731
assert len(servers) == 1
38-
sinfo = servers[0]
39-
32+
sinfo = servers[0]
33+
4034
assert sinfo['port'] == app.port
4135
assert sinfo['url'] == app.connection_url
4236
assert sinfo['version'] == app.version
43-
37+
4438
app.remove_server_info_file()
4539

4640
assert list(list_running_servers(app.runtime_dir)) == []
@@ -62,7 +56,7 @@ def test_root_dir(tmp_path, configurable_serverapp):
6256
)
6357
def invalid_root_dir(tmp_path, request):
6458
path = tmp_path.joinpath(*request.param)
65-
# If the path is a file, create it.
59+
# If the path is a file, create it.
6660
if os.path.splitext(str(path))[1] != '':
6761
path.write_text('')
6862
return str(path)
@@ -90,10 +84,10 @@ def valid_root_dir(tmp_path, request):
9084
def test_valid_root_dir(valid_root_dir, configurable_serverapp):
9185
app = configurable_serverapp(root_dir=valid_root_dir)
9286
root_dir = valid_root_dir
93-
# If nested path, the last slash should
87+
# If nested path, the last slash should
9488
# be stripped by the root_dir trait.
9589
if root_dir != '/':
96-
root_dir = valid_root_dir.rstrip('/')
90+
root_dir = valid_root_dir.rstrip('/')
9791
assert app.root_dir == root_dir
9892

9993

0 commit comments

Comments
 (0)