@@ -35,9 +35,9 @@ def test_solc_045(self, run_command, test_contracts_dir, backup_current_version)
3535 # Test expected compilation failure
3636 result = run_command (f"solc { test_contracts_dir } /solc045_fail_compile.sol" , check = False )
3737 assert result .returncode != 0
38- assert (
39- "Error: Expected token Semicolon got 'Function'" in result .stdout
40- ), f"solc045_fail_compile did not fail as expected. Output: { result . stdout } "
38+ assert "Error: Expected token Semicolon got 'Function'" in result . stdout , (
39+ f"solc045_fail_compile did not fail as expected. Output: { result .stdout } "
40+ )
4141
4242 def test_solc_050 (self , run_command , test_contracts_dir , backup_current_version ):
4343 """Test Solidity 0.5.0 compilation behavior."""
@@ -83,9 +83,9 @@ def test_solc_070(self, run_command, test_contracts_dir, backup_current_version)
8383 # Test deprecated 'now' keyword
8484 result = run_command (f"solc { test_contracts_dir } /solc070_fail_compile.sol" , check = False )
8585 assert result .returncode != 0
86- assert (
87- '"now" has been deprecated.' in result .stdout
88- ), f"solc070_fail_compile did not show deprecation warning. Output: { result . stdout } "
86+ assert '"now" has been deprecated.' in result . stdout , (
87+ f"solc070_fail_compile did not show deprecation warning. Output: { result .stdout } "
88+ )
8989
9090 # Test successful compilation
9191 result = run_command (f"solc { test_contracts_dir } /solc070_success.sol" , check = False )
@@ -106,16 +106,16 @@ def test_solc_080(self, run_command, test_contracts_dir, backup_current_version)
106106 result = run_command (f"solc { test_contracts_dir } /solc080_success_warning.sol" , check = False )
107107 # Should succeed but with warning
108108 assert result .returncode == 0
109- assert (
110- "Warning: Function state mutability can be restricted to pure" in result .stdout
111- ), f"solc080_success_warning did not show expected warning. Output: { result . stdout } "
109+ assert "Warning: Function state mutability can be restricted to pure" in result . stdout , (
110+ f"solc080_success_warning did not show expected warning. Output: { result .stdout } "
111+ )
112112
113113 # Test expected compilation failure
114114 result = run_command (f"solc { test_contracts_dir } /solc080_fail_compile.sol" , check = False )
115115 assert result .returncode != 0
116- assert (
117- "Error: Explicit type conversion not allowed" in result .stdout
118- ), f"solc080_fail_compile did not fail as expected. Output: { result . stdout } "
116+ assert "Error: Explicit type conversion not allowed" in result . stdout , (
117+ f"solc080_fail_compile did not fail as expected. Output: { result .stdout } "
118+ )
119119
120120
121121class TestVersionSwitching :
@@ -150,9 +150,9 @@ def test_always_install_flag(self, run_command, solc_select_path, backup_current
150150 # Use with --always-install should install and switch
151151 result = run_command ("solc-select use 0.8.9 --always-install" , check = False )
152152 assert result .returncode == 0
153- assert (
154- "Switched global version to 0.8.9" in result .stdout
155- ), f"Failed to switch with --always-install. Output: { result . stdout } "
153+ assert "Switched global version to 0.8.9" in result . stdout , (
154+ f"Failed to switch with --always-install. Output: { result .stdout } "
155+ )
156156
157157 def test_use_without_install (self , run_command , solc_select_path , backup_current_version ):
158158 """Test that 'use' fails when version is not installed."""
@@ -184,9 +184,9 @@ def test_use_without_install(self, run_command, solc_select_path, backup_current
184184 # Use without install should fail
185185 result = run_command ("solc-select use 0.8.1" , check = False )
186186 assert result .returncode != 0
187- assert (
188- "'0.8.1' must be installed prior to use" in result .stdout
189- ), f"Did not fail as expected when version not installed. Output: { result . stdout } "
187+ assert "'0.8.1' must be installed prior to use" in result . stdout , (
188+ f"Did not fail as expected when version not installed. Output: { result .stdout } "
189+ )
190190
191191 # Clean up: install 0.8.1 for other tests
192192 run_command ("solc-select install 0.8.1" , check = False )
0 commit comments