Skip to content

Commit 85eba17

Browse files
committed
Some more output in test
1 parent 9b04bb4 commit 85eba17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_serverapp.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ async def test_invalid_preferred_dir_not_root_subdir_set(tmp_path, jp_configurab
386386
not_subdir_path = os.path.relpath(tmp_path, path)
387387

388388
app = jp_configurable_serverapp(root_dir=path)
389+
app.contents_manager.preferred_dir = not_subdir_path
389390
with pytest.raises(HTTPError) as error:
390-
app.contents_manager.preferred_dir = not_subdir_path
391391
await app.contents_manager.dir_exists(app.contents_manager.preferred_dir)
392392

393393
assert "is outside root contents directory" in str(error.value)
@@ -398,9 +398,10 @@ async def test_absolute_preferred_dir_not_root_subdir_set(tmp_path, jp_configura
398398
os.makedirs(path, exist_ok=True)
399399
not_subdir_path = str(tmp_path)
400400

401+
app = jp_configurable_serverapp(root_dir=path)
402+
app.contents_manager.preferred_dir = not_subdir_path
401403
with pytest.raises(HTTPError) as error:
402-
app = jp_configurable_serverapp(root_dir=path)
403-
app.contents_manager.preferred_dir = not_subdir_path
404+
print(app.contents_manager.preferred_dir)
404405
await app.contents_manager.dir_exists(app.contents_manager.preferred_dir)
405406

406407
if os.name == "nt":

0 commit comments

Comments
 (0)