@@ -62,7 +62,7 @@ def create_clean_solc_select_environment(request):
6262
6363
6464@pytest .mark .usefixtures ("create_clean_solc_select_environment" )
65- @pytest .mark .parametrize ("solc_version" , ["0.8.21" , "0.8.26 " ])
65+ @pytest .mark .parametrize ("solc_version" , ["0.8.24 " ])
6666class TestSolcVersion : # noqa: D101
6767 def test_solc_versions_flag (self , pytester , solc_version ):
6868 """Ensure that the version specified by the `--solc-version` gets installed and is used."""
@@ -74,8 +74,10 @@ def test_solc_versions_flag(self, pytester, solc_version):
7474 @pytest.fixture(autouse=True)
7575 def check_solc_version(request, solc_bin):
7676 assert request.config.getoption("solc_version") == "{ solc_version } "
77- assert Solc(solc_bin).version == "{ solc_version } "
78- """
77+ version = Solc(solc_bin).version
78+ versionString = str(version.major) + "." + str(version.minor) + "." + str(version.patch)
79+ assert versionString == "{ solc_version } "
80+ """ # noqa: E501
7981 )
8082 pytester .copy_example (name = "pytest.ini" )
8183 pytester .copy_example (name = "tests/homestead/yul/test_yul_example.py" )
@@ -85,6 +87,7 @@ def check_solc_version(request, solc_bin):
8587 "--flat-output" , # required as copy_example doesn't copy to "tests/"" sub-folder
8688 "-m" ,
8789 "state_test" ,
90+ "-vv" ,
8891 f"--solc-version={ solc_version } " ,
8992 )
9093
@@ -144,17 +147,16 @@ class TestSolcBin:
144147
145148 @pytest .fixture ()
146149 def solc_version (self ): # noqa: D102
147- return "0.8.25 "
150+ return "0.8.24 "
148151
149152 @pytest .fixture ()
150153 def solc_bin (self , solc_version ):
151154 """Return available solc binary."""
152- solc_select .solc_select .switch_global_version (solc_version , always_install = True )
153- bin_path = Path (f"solc-{ solc_version } " ) / f"solc-{ solc_version } "
154- return solc_select .constants .ARTIFACTS_DIR .joinpath (bin_path )
155+ # return ".venv/.solc-select/artifacts/solc-0.8.24/solc-0.8.24"
156+ return None
155157
156158 def test_solc_bin (self , pytester , solc_version , solc_bin ):
157- """Ensure that the version specified by the `--solc-version` gets installed and is used."""
159+ """Ensure that the version specified by the `--solc-version` is used."""
158160 pytester .makeconftest (
159161 f"""
160162 import pytest
@@ -163,8 +165,10 @@ def test_solc_bin(self, pytester, solc_version, solc_bin):
163165 @pytest.fixture(autouse=True)
164166 def check_solc_version(request, solc_bin):
165167 # test via solc_bin fixture
166- assert Solc(solc_bin).version == "{ solc_version } "
167- """
168+ version = Solc(solc_bin).version
169+ versionString = str(version.major) + "." + str(version.minor) + "." + str(version.patch)
170+ assert versionString == "{ solc_version } "
171+ """ # noqa: E501
168172 )
169173 pytester .copy_example (name = "pytest.ini" )
170174 pytester .copy_example (name = "tests/homestead/yul/test_yul_example.py" )
@@ -173,6 +177,7 @@ def check_solc_version(request, solc_bin):
173177 "--fork=Homestead" ,
174178 "-m" ,
175179 "state_test" ,
180+ "-vv" ,
176181 "--flat-output" , # required as copy_example doesn't copy to "tests/"" sub-folder,
177182 f"--solc-bin={ solc_bin } " ,
178183 )
0 commit comments