Skip to content

Commit 6cf530e

Browse files
committed
Remove unused imports/variables
1 parent aabf8de commit 6cf530e

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

tests/services/config/test_api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import json
2-
import pytest
3-
4-
from jupyter_server.utils import url_path_join
52

63

74
async def test_create_retrieve_config(jp_fetch):

tests/services/kernels/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async def test_kernel_handler(jp_fetch):
183183
# Request to delete a non-existent kernel id
184184
bad_id = '111-111-111-111-111'
185185
with pytest.raises(tornado.httpclient.HTTPClientError) as e:
186-
r = await jp_fetch(
186+
await jp_fetch(
187187
'api', 'kernels', bad_id,
188188
method='DELETE'
189189
)

tests/services/nbconvert/test_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import json
2-
import pytest
32

43
async def test_list_formats(jp_fetch):
54
r = await jp_fetch(

tests/test_files.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ async def test_hidden_files(jp_fetch, jp_serverapp, jp_root_dir):
2222
dirs = not_hidden + hidden
2323

2424
for d in dirs:
25-
path = jp_root_dir / d.replace('/', os.sep)
25+
path = jp_root_dir / d.replace('/', os.sep)
2626
path.mkdir(parents=True, exist_ok=True)
2727
path.joinpath('foo').write_text('foo')
2828
path.joinpath('.foo').write_text('.foo')
2929

30-
3130
for d in not_hidden:
32-
path = jp_root_dir / d.replace('/', os.sep)
33-
3431
r = await jp_fetch(
3532
'files', d, 'foo',
3633
method='GET'
@@ -44,9 +41,7 @@ async def test_hidden_files(jp_fetch, jp_serverapp, jp_root_dir):
4441
)
4542
assert expected_http_error(e, 404)
4643

47-
4844
for d in hidden:
49-
path = jp_root_dir / d.replace('/', os.sep)
5045
for foo in ('foo', '.foo'):
5146
with pytest.raises(tornado.httpclient.HTTPClientError) as e:
5247
r = await jp_fetch(
@@ -58,8 +53,6 @@ async def test_hidden_files(jp_fetch, jp_serverapp, jp_root_dir):
5853
jp_serverapp.contents_manager.allow_hidden = True
5954

6055
for d in not_hidden:
61-
path = jp_root_dir / d.replace('/', os.sep)
62-
6356
r = await jp_fetch(
6457
'files', d, 'foo',
6558
method='GET'
@@ -72,15 +65,13 @@ async def test_hidden_files(jp_fetch, jp_serverapp, jp_root_dir):
7265
)
7366
assert r.body.decode() == '.foo'
7467

75-
for d in hidden:
76-
path = jp_root_dir / d.replace('/', os.sep)
77-
78-
for foo in ('foo', '.foo'):
79-
r = await jp_fetch(
80-
'files', d, foo,
81-
method='GET'
82-
)
83-
assert r.body.decode() == foo
68+
for d in hidden:
69+
for foo in ('foo', '.foo'):
70+
r = await jp_fetch(
71+
'files', d, foo,
72+
method='GET'
73+
)
74+
assert r.body.decode() == foo
8475

8576

8677
async def test_contents_manager(jp_fetch, jp_serverapp, jp_root_dir):

0 commit comments

Comments
 (0)