summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-07-26 09:32:39 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-07-26 09:37:32 -0500
commitdf2fa18a0865a202e91fcc0d8ca4a49b402baed3 (patch)
tree36c7d02c27ff1e5a236c6de238a7c6447eb0cdc9 /tests
parentf82b5d62d0c4e48b95466bb259f3401aecf28de7 (diff)
downloadflake8-df2fa18a0865a202e91fcc0d8ca4a49b402baed3.tar.gz
Fix project config file discovery
Flake8 3.0 was stopping once it found the current directory but the historical behaviour (that we didn't intend to break) searched past that (towards root) until it found one of the project/local config file names that could be read. Closes #181
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_config_file_finder.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/tests/unit/test_config_file_finder.py b/tests/unit/test_config_file_finder.py
index 2e1a1e5..3f321da 100644
--- a/tests/unit/test_config_file_finder.py
+++ b/tests/unit/test_config_file_finder.py
@@ -43,27 +43,15 @@ def test_cli_config():
# No arguments, common prefix of abspath('.')
([],
[os.path.abspath('setup.cfg'),
- os.path.abspath('tox.ini'),
- os.path.abspath('.flake8')]),
+ os.path.abspath('tox.ini')]),
# Common prefix of "flake8/"
(['flake8/options', 'flake8/'],
- [os.path.abspath('flake8/setup.cfg'),
- os.path.abspath('flake8/tox.ini'),
- os.path.abspath('flake8/.flake8'),
- os.path.abspath('setup.cfg'),
- os.path.abspath('tox.ini'),
- os.path.abspath('.flake8')]),
+ [os.path.abspath('setup.cfg'),
+ 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/tox.ini'),
- os.path.abspath('flake8/options/.flake8'),
- os.path.abspath('flake8/setup.cfg'),
- os.path.abspath('flake8/tox.ini'),
- os.path.abspath('flake8/.flake8'),
- os.path.abspath('setup.cfg'),
- os.path.abspath('tox.ini'),
- os.path.abspath('.flake8')]),
+ [os.path.abspath('setup.cfg'),
+ os.path.abspath('tox.ini')]),
])
def test_generate_possible_local_files(args, expected):
"""Verify generation of all possible config paths."""