Skip to content

KNOWN_ARCHITECTURES causes test failures on unknown machines #59

@thesamesam

Description

@thesamesam

In Gentoo, we saw discovery tests failing (https://bugs.gentoo.org/971943) because the running architecture wasn't present in KNOWN_ARCHITECTURES. Requiring whitelisting of every platform CPython runs on is already quite unfortunate, but..

KNOWN_ARCHITECTURES was made part of public API for tox-dev/tox#3903 (discovery side: #56, 38eac12). This means we also can't just patch it downstream either.

The failure looks like:

 _______________________________________________ test_py_info_machine_property _______________________________________________
[gw0] linux -- Python 3.13.12 /var/tmp/portage/dev-python/python-discovery-1.2.1/work/python_discovery-1.2.1-python3_13/install/usr/bin/python3.13

     def test_py_info_machine_property() -> None:
         machine = CURRENT.machine
         assert machine is not None
         assert isinstance(machine, str)
         assert len(machine) > 0
 >       assert machine in KNOWN_ARCHITECTURES, f"unexpected machine value: {machine}"
 E       AssertionError: unexpected machine value: alpha
 E       assert 'alpha' in frozenset({'ppc64', 'riscv64', 'loongarch64', 'i686', 'x86_64', 'ppc64le', 'x86', 'arm64', 's390x'}
 )
 
 machine    = 'alpha'
 
 tests/py_info/test_py_info.py:341: AssertionError

Can you please reconsider this approach? The status quo means we'll need to manually add various arches and then wait for a new discovery release for tox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions