Skip to content

Commit fe3658d

Browse files
committed
finish comments in unit test
1 parent 2c289bb commit fe3658d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_server/tests/services/sessions/test_manager.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,20 @@ async def test_bad_database_filepath(jp_runtime_dir):
274274

275275
# Try to write to a path that's a directory, not a file.
276276
path_id_directory = str(jp_runtime_dir)
277+
# Should raise an error because the path is a directory.
277278
with pytest.raises(TraitError) as err:
278279
SessionManager(
279280
kernel_manager=kernel_manager,
280281
contents_manager=ContentsManager(),
281282
database_filepath=str(path_id_directory)
282283
)
283284

284-
# Try writing to file that's not a database
285+
# Try writing to file that's not a valid SQLite 3 database file.
285286
non_db_file = jp_runtime_dir.joinpath("non_db_file.db")
286287
non_db_file.write_bytes(b"this is a bad file")
287288

289+
# Should raise an error because the file doesn't
290+
# start with an SQLite database file header.
288291
with pytest.raises(TraitError) as err:
289292
SessionManager(
290293
kernel_manager=kernel_manager,

0 commit comments

Comments
 (0)