@@ -13,8 +13,8 @@ def test_minimal_convert_nwb_dataset_from_directory(
1313):
1414 nwb_paths = [minimal_nwbfile_path .parent ]
1515 run_config = nwb2bids .RunConfig (bids_directory = temporary_bids_directory )
16- converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
17- assert len ( converter .notifications ) < 3
16+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
17+ assert not any ( dataset_converter .notifications )
1818
1919 expected_structure = {
2020 temporary_bids_directory : {
@@ -46,8 +46,8 @@ def test_minimal_convert_nwb_dataset_from_directory(
4646 directory = temporary_bids_directory , expected_structure = expected_structure
4747 )
4848
49- assert converter .run_config .notifications_json_file_path .exists ()
50- with converter .run_config .notifications_json_file_path .open (mode = "r" ) as file_stream :
49+ assert dataset_converter .run_config .notifications_json_file_path .exists ()
50+ with dataset_converter .run_config .notifications_json_file_path .open (mode = "r" ) as file_stream :
5151 notifications_json = json .load (fp = file_stream )
5252 expected_notification_json = []
5353 assert notifications_json == expected_notification_json
@@ -58,7 +58,8 @@ def test_minimal_convert_nwb_dataset_from_file_path(
5858):
5959 nwb_paths = [minimal_nwbfile_path ]
6060 run_config = nwb2bids .RunConfig (bids_directory = temporary_bids_directory )
61- nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
61+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
62+ assert not any (dataset_converter .notifications )
6263
6364 expected_structure = {
6465 temporary_bids_directory : {
@@ -96,8 +97,8 @@ def test_ecephys_tutorial_convert_nwb_dataset(
9697):
9798 nwb_paths = [ecephys_tutorial_nwbfile_path ]
9899 run_config = nwb2bids .RunConfig (bids_directory = temporary_bids_directory )
99- converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
100- assert not any (converter .notifications )
100+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
101+ assert not any (dataset_converter .notifications )
101102
102103 expected_structure = {
103104 temporary_bids_directory : {
@@ -184,8 +185,8 @@ def test_ecephys_minimal_convert_nwb_dataset(
184185):
185186 nwb_paths = [ecephys_minimal_nwbfile_path ]
186187 run_config = nwb2bids .RunConfig (bids_directory = temporary_bids_directory )
187- converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
188- assert not any (converter .notifications )
188+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths , run_config = run_config )
189+ assert not any (dataset_converter .notifications )
189190
190191 expected_structure = {
191192 temporary_bids_directory : {
@@ -274,7 +275,8 @@ def test_implicit_bids_directory(
274275 monkeypatch .chdir (temporary_bids_directory )
275276
276277 nwb_paths = [minimal_nwbfile_path ]
277- nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths )
278+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths )
279+ assert not any (dataset_converter .notifications )
278280
279281 expected_structure = {
280282 implicit_bids_directory : {
@@ -316,9 +318,8 @@ def test_implicit_bids_directory_with_relative_nwb_paths(
316318 nwb_relative = minimal_nwbfile_path .relative_to (temporary_run_directory .parent )
317319 nwb_paths = [pathlib .Path (".." ) / nwb_relative ]
318320
319- converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths )
320-
321- assert not any (converter .notifications )
321+ dataset_converter = nwb2bids .convert_nwb_dataset (nwb_paths = nwb_paths )
322+ assert not any (dataset_converter .notifications )
322323
323324 expected_structure = {
324325 temporary_run_directory : {
0 commit comments