summaryrefslogtreecommitdiff
path: root/tests/unit/test_pyflakes_codes.py
blob: 837e971bd1fe5eed648498c76f1a7aa2b6c8731f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Tests of pyflakes monkey patches."""

import pyflakes

from flake8.plugins import pyflakes as pyflakes_shim


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)