1616
1717from bci_tester .data import OS_VERSION
1818from bci_tester .data import PYTHON_CONTAINERS
19+ from bci_tester .data import PYTHON_MICRO_CONTAINERS
1920from bci_tester .data import PYTHON_WITH_PIPX_CONTAINERS
2021from bci_tester .runtime_choice import PODMAN_SELECTED
2122
2829
2930
3031#: Base containers under test, input of auto_container fixture
31- CONTAINER_IMAGES = PYTHON_CONTAINERS
32+ CONTAINER_IMAGES = PYTHON_CONTAINERS + PYTHON_MICRO_CONTAINERS
3233
3334
3435#: Derived containers with the python http.server as CMD and a HEALTHCHECK
4748 marks = CONTAINER_T .marks ,
4849 id = CONTAINER_T .id ,
4950 )
50- for CONTAINER_T in CONTAINER_IMAGES
51+ for CONTAINER_T in PYTHON_CONTAINERS
5152]
5253
5354REQUESTS_CONTAINER_IMAGES = [
@@ -197,11 +198,16 @@ def test_tox(auto_container_per_test):
197198
198199
199200@pytest .mark .skipif (
200- OS_VERSION == "16.0" , reason = "no packaged tox version available"
201+ OS_VERSION in ["16.0" , "16.1" ], reason = "no packaged tox version available"
202+ )
203+ @pytest .mark .parametrize (
204+ "container_per_test" ,
205+ PYTHON_CONTAINERS ,
206+ indirect = ["container_per_test" ],
201207)
202- def test_packaged_tox (auto_container_per_test ):
208+ def test_packaged_tox (container_per_test ):
203209 """Ensure we can use the packaged tox version."""
204- version = auto_container_per_test .connection .check_output (
210+ version = container_per_test .connection .check_output (
205211 "echo $PYTHON_VERSION"
206212 )
207213 if (
@@ -211,14 +217,19 @@ def test_packaged_tox(auto_container_per_test):
211217 ):
212218 pytest .skip ("packaged tox not available" )
213219
214- auto_container_per_test .connection .check_output (
220+ container_per_test .connection .check_output (
215221 f"zypper --non-interactive in { 'python311' if version .startswith ('3.11' ) else 'python3' } -tox && tox --version"
216222 )
217223
218224
219- def test_pep517_wheels (auto_container_per_test ):
225+ @pytest .mark .parametrize (
226+ "container_per_test" ,
227+ PYTHON_CONTAINERS ,
228+ indirect = ["container_per_test" ],
229+ )
230+ def test_pep517_wheels (container_per_test ):
220231 """Ensure we can use :command:`pip` to build PEP517 binary wheels"""
221- version = auto_container_per_test .connection .check_output (
232+ version = container_per_test .connection .check_output (
222233 "echo $PYTHON_VERSION"
223234 )
224235 if "3.12" in version and OS_VERSION not in ("tumbleweed" ,):
@@ -232,7 +243,7 @@ def test_pep517_wheels(auto_container_per_test):
232243 if OS_VERSION in ("tumbleweed" ,):
233244 pip_install += " --break-system-packages --user"
234245 ujson_version = "5.10.0"
235- auto_container_per_test .connection .check_output (
246+ container_per_test .connection .check_output (
236247 "zypper -n install gcc-c++ && "
237248 f"pip download --no-deps --no-binary :all: ujson=={ ujson_version } && "
238249 f"tar --no-same-permissions --no-same-owner -xf ujson-{ ujson_version } .tar.gz && "
@@ -248,31 +259,36 @@ def test_pep517_wheels(auto_container_per_test):
248259 OS_VERSION == "tumbleweed" ,
249260 reason = "pip --user not working due to PEP 668" ,
250261)
251- def test_pip_install_source_cryptography (auto_container_per_test ):
262+ @pytest .mark .parametrize (
263+ "container_per_test" ,
264+ PYTHON_CONTAINERS ,
265+ indirect = ["container_per_test" ],
266+ )
267+ def test_pip_install_source_cryptography (container_per_test ):
252268 """Check that cryptography python module can be installed from source so that
253269 it is built against the SLE BCI FIPS enabled libopenssl."""
254- version = auto_container_per_test .connection .check_output (
270+ version = container_per_test .connection .check_output (
255271 "echo $PYTHON_VERSION"
256272 )
257273
258274 if packaging .version .Version (version ) < packaging .version .Version ("3.10" ):
259275 pytest .skip ("cryptography tests only supported on >= 3.10" )
260276
261277 # install dependencies
262- auto_container_per_test .connection .run_expect (
278+ container_per_test .connection .run_expect (
263279 [0 ],
264280 "zypper --non-interactive in cargo libffi-devel openssl-devel gcc tar gzip" ,
265281 )
266282
267283 # pin cryptography to a version that works with SLE BCI
268284 cryptography_version = "37.0.4"
269- auto_container_per_test .connection .run_expect (
285+ container_per_test .connection .run_expect (
270286 [0 ],
271287 f"pip install --no-binary :all: cryptography=={ cryptography_version } " ,
272288 )
273289
274290 # test cryptography
275- auto_container_per_test .connection .run_expect (
291+ container_per_test .connection .run_expect (
276292 [0 ],
277293 f"""pip install cryptography-vectors=={ cryptography_version } pytest &&
278294 pip download --no-binary :all: cryptography=={ cryptography_version } &&
0 commit comments