Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922514 - dev-python/mypy-1.7.1 fails tests: mypy/test/teststubtest.py::StubtestUnit::test_runtime_typing_objects - AssertionError: test_module.Y.__mutable_keys__
Summary: dev-python/mypy-1.7.1 fails tests: mypy/test/teststubtest.py::StubtestUnit::t...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 919533
  Show dependency tree
 
Reported: 2024-01-19 21:14 UTC by matoro
Modified: 2024-01-19 21:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (build.log.gz,273.26 KB, application/gzip)
2024-01-19 21:15 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-01-19 21:14:03 UTC
Sample from amd64.  USE=native-extensions has no effect, on or off.

=================================== FAILURES ===================================
___________________ StubtestUnit.test_runtime_typing_objects ___________________
[gw2] linux -- Python 3.11.7 /var/tmp/portage/dev-python/mypy-1.7.1/work/mypy-1.7.1-python3_11/install/usr/bin/python3.11

args = (<mypy.test.teststubtest.StubtestUnit testMethod=test_runtime_typing_objects>,)
kwargs = {}
cases = [<mypy.test.teststubtest.Case object at 0x717c351e1ad0>, <mypy.test.teststubtest.Case object at 0x717c364d3050>, <mypy.test.teststubtest.Case object at 0x717c34c32150>]
expected_errors = set()
c = <mypy.test.teststubtest.Case object at 0x717c34c32150>, @py_assert1 = False
@py_format3 = "{'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'} == set()\n~Extra items in the left set:\n~'test....Y.__readonly_keys__'\n~Full diff:\n~- set()\n~+ {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'}"
@py_format5 = "test_module.Y.__mutable_keys__\n~test_module.Y.__readonly_keys__\n~\n>assert {'test_module.Y.__mutable_keys__', 'test....Y.__readonly_keys__'\n~Full diff:\n~- set()\n~+ {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'}"
output = 'test_module.Y.__mutable_keys__\ntest_module.Y.__readonly_keys__\n'
actual_errors = {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'}

    def test(*args: Any, **kwargs: Any) -> None:
        cases = list(fn(*args, **kwargs))
        expected_errors = set()
        for c in cases:
            if c.error is None:
                continue
            expected_error = c.error
            if expected_error == "":
                expected_error = TEST_MODULE_NAME
            elif not expected_error.startswith(f"{TEST_MODULE_NAME}."):
                expected_error = f"{TEST_MODULE_NAME}.{expected_error}"
            assert expected_error not in expected_errors, (
                "collect_cases merges cases into a single stubtest invocation; we already "
                "expect an error for {}".format(expected_error)
            )
            expected_errors.add(expected_error)
        output = run_stubtest(
            stub="\n\n".join(textwrap.dedent(c.stub.lstrip("\n")) for c in cases),
            runtime="\n\n".join(textwrap.dedent(c.runtime.lstrip("\n")) for c in cases),
            options=["--generate-allowlist"],
        )
    
        actual_errors = set(output.splitlines())
>       assert actual_errors == expected_errors, output
E       AssertionError: test_module.Y.__mutable_keys__
E         test_module.Y.__readonly_keys__
E         
E       assert {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'} == set()
E         Extra items in the left set:
E         'test_module.Y.__mutable_keys__'
E         'test_module.Y.__readonly_keys__'
E         Full diff:
E         - set()
E         + {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'}

actual_errors = {'test_module.Y.__mutable_keys__', 'test_module.Y.__readonly_keys__'}
args       = (<mypy.test.teststubtest.StubtestUnit testMethod=test_runtime_typing_objects>,)
c          = <mypy.test.teststubtest.Case object at 0x717c34c32150>
cases      = [<mypy.test.teststubtest.Case object at 0x717c351e1ad0>,
 <mypy.test.teststubtest.Case object at 0x717c364d3050>,
 <mypy.test.teststubtest.Case object at 0x717c34c32150>]
expected_errors = set()
fn         = <function StubtestUnit.test_runtime_typing_objects at 0x717c3a66ccc0>
kwargs     = {}
output     = 'test_module.Y.__mutable_keys__\ntest_module.Y.__readonly_keys__\n'

mypy/test/teststubtest.py:211: AssertionError

Reproducible: Always
Comment 1 matoro archtester 2024-01-19 21:15:21 UTC
Created attachment 882659 [details]
build.log and emerge --info