diff options
| author | Tom Prince <tom.prince@twistedmatrix.com> | 2016-06-21 08:57:52 -0600 |
|---|---|---|
| committer | Tom Prince <tom.prince@twistedmatrix.com> | 2016-06-25 14:22:21 -0600 |
| commit | db9d4ad8b4cc2aab1ef8349dc969faa8f589e9cc (patch) | |
| tree | 54db9d9cd4c6c1ab7410b4a0ff6313fe57456ec8 /tests | |
| parent | 00575214dbef70356fbcb59b597aa8c98aed236c (diff) | |
| download | flake8-db9d4ad8b4cc2aab1ef8349dc969faa8f589e9cc.tar.gz | |
Prefer `.flake8` if present for options.
If somebody explicitly has a `.flake8` file, presumably they intend to
put flake8 configuration in it, so prefer it to the generic `setup.cfg`
and `tox.ini` from pycodestyle.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_config_file_finder.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/unit/test_config_file_finder.py b/tests/unit/test_config_file_finder.py index 2e1a1e5..56ff804 100644 --- a/tests/unit/test_config_file_finder.py +++ b/tests/unit/test_config_file_finder.py @@ -42,28 +42,28 @@ def test_cli_config(): @pytest.mark.parametrize('args,expected', [ # No arguments, common prefix of abspath('.') ([], - [os.path.abspath('setup.cfg'), - os.path.abspath('tox.ini'), - os.path.abspath('.flake8')]), + [os.path.abspath('.flake8'), + os.path.abspath('setup.cfg'), + os.path.abspath('tox.ini')]), # Common prefix of "flake8/" (['flake8/options', 'flake8/'], - [os.path.abspath('flake8/setup.cfg'), + [os.path.abspath('flake8/.flake8'), + os.path.abspath('flake8/setup.cfg'), os.path.abspath('flake8/tox.ini'), - os.path.abspath('flake8/.flake8'), + os.path.abspath('.flake8'), os.path.abspath('setup.cfg'), - os.path.abspath('tox.ini'), - os.path.abspath('.flake8')]), + os.path.abspath('tox.ini')]), # Common prefix of "flake8/options" (['flake8/options', 'flake8/options/sub'], - [os.path.abspath('flake8/options/setup.cfg'), + [os.path.abspath('flake8/options/.flake8'), + os.path.abspath('flake8/options/setup.cfg'), os.path.abspath('flake8/options/tox.ini'), - os.path.abspath('flake8/options/.flake8'), + os.path.abspath('flake8/.flake8'), os.path.abspath('flake8/setup.cfg'), os.path.abspath('flake8/tox.ini'), - os.path.abspath('flake8/.flake8'), + os.path.abspath('.flake8'), os.path.abspath('setup.cfg'), - os.path.abspath('tox.ini'), - os.path.abspath('.flake8')]), + os.path.abspath('tox.ini')]), ]) def test_generate_possible_local_files(args, expected): """Verify generation of all possible config paths.""" |
