@@ -153,9 +153,9 @@ def test_init_function_with_existing_metadata(self, fs, mocker) -> None:
153153 ), "Metadata file does not exist after init."
154154 with open (metadata_file_path ) as file : # noqa: PTH123
155155 content = file .read ()
156- assert (
157- content != original_content
158- ), "Metadata file was not overwritten with default content."
156+ assert content != original_content , (
157+ "Metadata file was not overwritten with default content."
158+ )
159159
160160 def test_init_function_fails_write (self , fs , mocker , capsys ) -> None :
161161 """Test that running 'init' should fail if it cannot write."""
@@ -263,12 +263,12 @@ def test_full_metadata_command(self, runner, fs_setup) -> None:
263263 result = runner .invoke (app , ["custom" , "metadata" ], input = "\n " )
264264
265265 # Verify command execution was successful
266- assert (
267- result . exit_code == 0
268- ), "The command did not complete successfully"
269- assert (
270- "You have entered the following data:" in result . output
271- ), "Expected output was not found"
266+ assert result . exit_code == 0 , (
267+ "The command did not complete successfully"
268+ )
269+ assert "You have entered the following data:" in result . output , (
270+ "Expected output was not found"
271+ )
272272
273273 # Verify the contents of metadata.py in the app/config subdirectory
274274 metadata_path = "/home/test/app/config/metadata.py"
@@ -281,23 +281,23 @@ def test_full_metadata_command(self, runner, fs_setup) -> None:
281281 value , dict
282282 ): # For nested structures like 'license'
283283 for nested_key , nested_value in value .items ():
284- assert (
285- str ( nested_value ) in metadata_contents
286- ), f" { nested_key } was not updated in metadata.py"
284+ assert str ( nested_value ) in metadata_contents , (
285+ f" { nested_key } was not updated in metadata.py"
286+ )
287287 else :
288- assert (
289- str ( value ) in metadata_contents
290- ), f" { key } was not updated correctly in metadata.py"
288+ assert str ( value ) in metadata_contents , (
289+ f" { key } was not updated correctly in metadata.py"
290+ )
291291
292292 # Verify the contents of pyproject.toml were updated
293293 with open ("/home/test/pyproject.toml" ) as f : # noqa: PTH123
294294 pyproject_contents = f .read ()
295- assert (
296- str ( self . test_data [ " version" ]) in pyproject_contents
297- ), "pyproject.toml version was not updated correctly"
298- assert (
299- str ( self . test_data [ "name" ]) in pyproject_contents
300- ), "pyproject.toml title was not updated correctly"
295+ assert str ( self . test_data [ "version" ]) in pyproject_contents , (
296+ "pyproject.toml version was not updated correctly"
297+ )
298+ assert str ( self . test_data [ "name" ]) in pyproject_contents , (
299+ "pyproject.toml title was not updated correctly"
300+ )
301301
302302 @pytest .mark .skipif (
303303 is_running_in_docker (), reason = "This test fails under docker"
0 commit comments