@@ -62,7 +62,7 @@ def create_clean_solc_select_environment(request):
62
62
63
63
64
64
@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 " ])
66
66
class TestSolcVersion : # noqa: D101
67
67
def test_solc_versions_flag (self , pytester , solc_version ):
68
68
"""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):
74
74
@pytest.fixture(autouse=True)
75
75
def check_solc_version(request, solc_bin):
76
76
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
79
81
)
80
82
pytester .copy_example (name = "pytest.ini" )
81
83
pytester .copy_example (name = "tests/homestead/yul/test_yul_example.py" )
@@ -85,6 +87,7 @@ def check_solc_version(request, solc_bin):
85
87
"--flat-output" , # required as copy_example doesn't copy to "tests/"" sub-folder
86
88
"-m" ,
87
89
"state_test" ,
90
+ "-vv" ,
88
91
f"--solc-version={ solc_version } " ,
89
92
)
90
93
@@ -144,17 +147,16 @@ class TestSolcBin:
144
147
145
148
@pytest .fixture ()
146
149
def solc_version (self ): # noqa: D102
147
- return "0.8.25 "
150
+ return "0.8.24 "
148
151
149
152
@pytest .fixture ()
150
153
def solc_bin (self , solc_version ):
151
154
"""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
155
157
156
158
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."""
158
160
pytester .makeconftest (
159
161
f"""
160
162
import pytest
@@ -163,8 +165,10 @@ def test_solc_bin(self, pytester, solc_version, solc_bin):
163
165
@pytest.fixture(autouse=True)
164
166
def check_solc_version(request, solc_bin):
165
167
# 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
168
172
)
169
173
pytester .copy_example (name = "pytest.ini" )
170
174
pytester .copy_example (name = "tests/homestead/yul/test_yul_example.py" )
@@ -173,6 +177,7 @@ def check_solc_version(request, solc_bin):
173
177
"--fork=Homestead" ,
174
178
"-m" ,
175
179
"state_test" ,
180
+ "-vv" ,
176
181
"--flat-output" , # required as copy_example doesn't copy to "tests/"" sub-folder,
177
182
f"--solc-bin={ solc_bin } " ,
178
183
)
0 commit comments