@@ -157,7 +157,7 @@ def crashing_filter(_):
157157 create_archive ([struct ], test_run = True , forbidden_licenses = crashing_filter )
158158
159159
160- @pytest .mark .usefixtures (" aiida_profile_clean" )
160+ @pytest .mark .usefixtures (' aiida_profile_clean' )
161161def test_tmp_dir_custom_valid (tmp_path ):
162162 """Test using a custom valid temporary directory."""
163163 from unittest .mock import patch
@@ -180,24 +180,26 @@ def test_tmp_dir_custom_valid(tmp_path):
180180 # Check that TemporaryDirectory was called with custom directory
181181 mock_temp_dir .assert_called_once_with (dir = custom_tmp , prefix = None )
182182
183- @pytest .mark .usefixtures ("aiida_profile_clean" )
183+
184+ @pytest .mark .usefixtures ('aiida_profile_clean' )
184185def test_tmp_dir_validation_errors (tmp_path ):
185186 """Test tmp_dir validation errors."""
186187
187188 node = orm .Int (42 ).store ()
188189 filename = tmp_path / 'export.aiida'
189190
190191 # Non-existent directory
191- with pytest .raises (ArchiveExportError , match = " does not exist" ):
192+ with pytest .raises (ArchiveExportError , match = ' does not exist' ):
192193 create_archive ([node ], filename = filename , tmp_dir = tmp_path / 'nonexistent' )
193194
194195 # File instead of directory
195196 not_a_dir = tmp_path / 'file.txt'
196197 not_a_dir .write_text ('content' )
197- with pytest .raises (ArchiveExportError , match = " is not a directory" ):
198+ with pytest .raises (ArchiveExportError , match = ' is not a directory' ):
198199 create_archive ([node ], filename = filename , tmp_dir = not_a_dir )
199200
200- @pytest .mark .usefixtures ("aiida_profile_clean" )
201+
202+ @pytest .mark .usefixtures ('aiida_profile_clean' )
201203def test_tmp_dir_disk_space_error (tmp_path ):
202204 """Test disk space error handling."""
203205 from unittest .mock import patch
@@ -208,10 +210,10 @@ def test_tmp_dir_disk_space_error(tmp_path):
208210 filename = tmp_path / 'export.aiida'
209211
210212 def mock_temp_dir_error (* args , ** kwargs ):
211- error = OSError (" No space left on device" )
213+ error = OSError (' No space left on device' )
212214 error .errno = 28
213215 raise error
214216
215217 with patch ('tempfile.TemporaryDirectory' , side_effect = mock_temp_dir_error ):
216- with pytest .raises (ArchiveExportError , match = " Insufficient disk space.*--tmp-dir" ):
218+ with pytest .raises (ArchiveExportError , match = ' Insufficient disk space.*--tmp-dir' ):
217219 create_archive ([node ], filename = filename , tmp_dir = custom_tmp )
0 commit comments