Commit fe3658d 1 parent 2c289bb commit fe3658d Copy full SHA for fe3658d
File tree 1 file changed +4
-1
lines changed
jupyter_server/tests/services/sessions
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -274,17 +274,20 @@ async def test_bad_database_filepath(jp_runtime_dir):
274
274
275
275
# Try to write to a path that's a directory, not a file.
276
276
path_id_directory = str (jp_runtime_dir )
277
+ # Should raise an error because the path is a directory.
277
278
with pytest .raises (TraitError ) as err :
278
279
SessionManager (
279
280
kernel_manager = kernel_manager ,
280
281
contents_manager = ContentsManager (),
281
282
database_filepath = str (path_id_directory )
282
283
)
283
284
284
- # Try writing to file that's not a database
285
+ # Try writing to file that's not a valid SQLite 3 database file.
285
286
non_db_file = jp_runtime_dir .joinpath ("non_db_file.db" )
286
287
non_db_file .write_bytes (b"this is a bad file" )
287
288
289
+ # Should raise an error because the file doesn't
290
+ # start with an SQLite database file header.
288
291
with pytest .raises (TraitError ) as err :
289
292
SessionManager (
290
293
kernel_manager = kernel_manager ,
You can’t perform that action at this time.
0 commit comments