13
13
14
14
# Test with and without sessions' aggregation
15
15
@pytest .mark .parametrize (
16
- 'aggr_ses_reports, expected_files' ,
16
+ ( 'aggr_ses_reports' , ' expected_files') ,
17
17
[
18
18
(
19
19
3 ,
29
29
],
30
30
)
31
31
# Test with and without crash file
32
- @pytest .mark .parametrize ('error' , ( True , False ) )
32
+ @pytest .mark .parametrize ('error' , [ True , False ] )
33
33
# Test with and without boilerplate
34
- @pytest .mark .parametrize ('boilerplate' , ( True , False ) )
34
+ @pytest .mark .parametrize ('boilerplate' , [ True , False ] )
35
35
# Test ses- prefix stripping
36
36
@pytest .mark .parametrize (
37
- 'session_list' , ([ '001' , '003' , '004' , '005' ], ['ses-001' , 'ses-003' , 'ses-004' , 'ses-005' ])
37
+ 'session_list' , [[ '001' , '003' , '004' , '005' ], ['ses-001' , 'ses-003' , 'ses-004' , 'ses-005' ]]
38
38
)
39
39
# Test sub- prefix stripping
40
- @pytest .mark .parametrize ('subject_label' , ( '001' , 'sub-001' ) )
40
+ @pytest .mark .parametrize ('subject_label' , [ '001' , 'sub-001' ] )
41
41
@pytest .mark .skipif (
42
42
not Path .exists (data_dir / 'work' ),
43
43
reason = 'Package installed - large test data directory excluded from wheel' ,
@@ -93,7 +93,7 @@ def mock_session_list(*args, **kwargs):
93
93
assert file_path .is_file (), f'Expected file { expected_file } is missing'
94
94
95
95
# Check if there are no unexpected HTML files
96
- unexpected_files = set ( file .name for file in tmp_path .glob ('*.html' )) - set (expected_files )
96
+ unexpected_files = { file .name for file in tmp_path .glob ('*.html' )} - set (expected_files )
97
97
assert not unexpected_files , f'Unexpected HTML files found: { unexpected_files } '
98
98
99
99
if not (boilerplate or error ):
@@ -103,9 +103,9 @@ def mock_session_list(*args, **kwargs):
103
103
if boilerplate :
104
104
assert (
105
105
'The boilerplate text was automatically generated' in html_content
106
- ), f'The file { file } did not contain the reported error.'
106
+ ), f'The file { expected_files [ 0 ] } did not contain the reported error.'
107
107
108
108
if error :
109
109
assert (
110
110
'One or more execution steps failed' in html_content
111
- ), f'The file { file } did not contain the reported error.'
111
+ ), f'The file { expected_files [ 0 ] } did not contain the reported error.'
0 commit comments