Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 test failures after update to 5.0.4 #22

Open
Apteryks opened this issue Nov 2, 2022 · 0 comments
Open

2 test failures after update to 5.0.4 #22

Apteryks opened this issue Nov 2, 2022 · 0 comments

Comments

@Apteryks
Copy link

Apteryks commented Nov 2, 2022

Hello,

After updating the GNU Guix python-flake8 package to 5.0.4, I encounter the following two test failures:

=================================== FAILURES ===================================
____________ test_all_pyflakes_messages_have_flake8_codes_assigned _____________

    def test_all_pyflakes_messages_have_flake8_codes_assigned():
        """Verify all PyFlakes messages have error codes assigned."""
        messages = {
            name
            for name, obj in vars(pyflakes.messages).items()
            if name[0].isupper() and obj.message
        }
>       assert messages == set(pyflakes_shim.FLAKE8_PYFLAKES_CODES)
E       AssertionError: assert {'AssertTuple...NotLast', ...} == {'AssertTuple...NotLast', ...}
E         Extra items in the left set:
E         'ReturnWithArgsInsideGenerator'
E         'RedefinedInListComp'
E         Full diff:
E           {
E            'AssertTuple',
E            'BreakOutsideLoop',...
E         
E         ...Full output truncated (48 lines hidden), use '-vv' to show

tests/unit/test_pyflakes_codes.py:16: AssertionError
_______________________________ test_up_to_date ________________________________

    def test_up_to_date():
        """Validate that the generated pycodestyle plugin is up to date.
    
        We generate two "meta" plugins for pycodestyle to avoid calling overhead.
    
        To regenerate run:
    
            ./bin/gen-pycodestyle-plugin > src/flake8/plugins/pycodestyle.py
        """
    
        path = os.path.join(HERE, "../../../bin/gen-pycodestyle-plugin")
        name = os.path.basename(path)
        loader = importlib.machinery.SourceFileLoader(name, path)
        spec = importlib.util.spec_from_loader(loader.name, loader)
        assert spec is not None
        mod = importlib.util.module_from_spec(spec)
>       loader.exec_module(mod)

tests/unit/plugins/pycodestyle_test.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
<frozen importlib._bootstrap_external>:846: in exec_module
    ???
<frozen importlib._bootstrap_external>:982: in get_code
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_frozen_importlib_external.SourceFileLoader object at 0x7ffff5c60bb0>
path = '/tmp/guix-build-python-flake8-5.0.4.drv-0/flake8-5.0.4/tests/unit/plugins/../../../bin/gen-pycodestyle-plugin'

>   ???
E   FileNotFoundError: [Errno 2] No such file or directory: '/tmp/guix-build-python-flake8-5.0.4.drv-0/flake8-5.0.4/tests/unit/plugins/../../../bin/gen-pycodestyle-plugin'

<frozen importlib._bootstrap_external>:1039: FileNotFoundError
======================== 2 failed, 476 passed in 1.45s =========================

This is with Python 3.9.9 and the following direct dependencies:
python-importlib-metadata@4.11.3 python-mccabe@0.6.1 python-pycodestyle@2.9.1

Any ideas what's going wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant