@@ -443,16 +443,12 @@ def test_get_current_version(self):
443443
444444 # Test with valid tag
445445 with patch ("subprocess.run" ) as mock_run :
446- mock_run .return_value = MagicMock (
447- stdout = "v1.5.0\n " , returncode = 0
448- )
446+ mock_run .return_value = MagicMock (stdout = "v1.5.0\n " , returncode = 0 )
449447 assert get_current_version () == "1.5.0"
450448
451449 # Test with tag without 'v' prefix
452450 with patch ("subprocess.run" ) as mock_run :
453- mock_run .return_value = MagicMock (
454- stdout = "1.5.0\n " , returncode = 0
455- )
451+ mock_run .return_value = MagicMock (stdout = "1.5.0\n " , returncode = 0 )
456452 assert get_current_version () == "1.5.0"
457453
458454 # Test with no tags
@@ -470,9 +466,15 @@ class TestReReleaseConfirmation:
470466 @patch ("pycoupler.release.get_current_branch" )
471467 @patch ("pycoupler.release.get_current_version" )
472468 @patch ("subprocess.run" )
473- def test_release_confirmation_yes (self , mock_subprocess , mock_current_version ,
474- mock_branch , mock_package , mock_update_citation ,
475- mock_run_command ):
469+ def test_release_confirmation_yes (
470+ self ,
471+ mock_subprocess ,
472+ mock_current_version ,
473+ mock_branch ,
474+ mock_package ,
475+ mock_update_citation ,
476+ mock_run_command ,
477+ ):
476478 """Test re-release confirmation with 'yes' response."""
477479 # Setup mocks
478480 mock_package .return_value = "test-package"
@@ -497,9 +499,15 @@ def test_release_confirmation_yes(self, mock_subprocess, mock_current_version,
497499 @patch ("pycoupler.release.get_current_branch" )
498500 @patch ("pycoupler.release.get_current_version" )
499501 @patch ("subprocess.run" )
500- def test_release_confirmation_no (self , mock_subprocess , mock_current_version ,
501- mock_branch , mock_package , mock_update_citation ,
502- mock_run_command ):
502+ def test_release_confirmation_no (
503+ self ,
504+ mock_subprocess ,
505+ mock_current_version ,
506+ mock_branch ,
507+ mock_package ,
508+ mock_update_citation ,
509+ mock_run_command ,
510+ ):
503511 """Test re-release confirmation with 'no' response."""
504512 # Setup mocks
505513 mock_package .return_value = "test-package"
@@ -523,9 +531,15 @@ def test_release_confirmation_no(self, mock_subprocess, mock_current_version,
523531 @patch ("pycoupler.release.get_current_branch" )
524532 @patch ("pycoupler.release.get_current_version" )
525533 @patch ("subprocess.run" )
526- def test_release_confirmation_invalid_then_valid (self , mock_subprocess , mock_current_version ,
527- mock_branch , mock_package , mock_update_citation ,
528- mock_run_command ):
534+ def test_release_confirmation_invalid_then_valid (
535+ self ,
536+ mock_subprocess ,
537+ mock_current_version ,
538+ mock_branch ,
539+ mock_package ,
540+ mock_update_citation ,
541+ mock_run_command ,
542+ ):
529543 """Test re-release confirmation with invalid then valid response."""
530544 # Setup mocks
531545 mock_package .return_value = "test-package"
@@ -550,9 +564,15 @@ def test_release_confirmation_invalid_then_valid(self, mock_subprocess, mock_cur
550564 @patch ("pycoupler.release.get_current_branch" )
551565 @patch ("pycoupler.release.get_current_version" )
552566 @patch ("subprocess.run" )
553- def test_no_confirmation_for_new_version (self , mock_subprocess , mock_current_version ,
554- mock_branch , mock_package , mock_update_citation ,
555- mock_run_command ):
567+ def test_no_confirmation_for_new_version (
568+ self ,
569+ mock_subprocess ,
570+ mock_current_version ,
571+ mock_branch ,
572+ mock_package ,
573+ mock_update_citation ,
574+ mock_run_command ,
575+ ):
556576 """Test that no confirmation is needed for new versions."""
557577 # Setup mocks
558578 mock_package .return_value = "test-package"
@@ -612,7 +632,9 @@ def test_full_release_workflow_mock(self):
612632
613633 mock_run_command .return_value = True
614634 mock_subprocess .return_value = MagicMock (returncode = 0 )
615- mock_current_version .return_value = "1.0.0" # Valid previous version
635+ mock_current_version .return_value = (
636+ "1.0.0" # Valid previous version
637+ )
616638
617639 # Test the main function
618640 with patch .object (sys , "argv" , ["release.py" , "2.0.0" ]):
0 commit comments