Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 28a119b

Browse files
committed
Fixed config issues found in tests.
1 parent c3a2bf4 commit 28a119b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pep257.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,11 +727,14 @@ def check(filenames, select=None, ignore=None):
727727
def get_options(args, opt_parser):
728728
config = RawConfigParser()
729729
parent = tail = os.path.abspath(os.path.commonprefix(args))
730-
while tail:
730+
config_found = False
731+
while tail and not config_found:
732+
log.info(tail)
731733
for fn in PROJECT_CONFIG:
732734
full_path = os.path.join(parent, fn)
733735
if config.read(full_path):
734736
log.info('local configuration: in %s.', full_path)
737+
config_found = True
735738
break
736739
parent, tail = os.path.split(parent)
737740

test_pep257.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def invoke_pep257(self, args=""):
6666

6767
def __enter__(self):
6868
self.tempdir = tempfile.mkdtemp()
69+
# Make sure we won't be affected by other config files
70+
self.write_config()
6971
return self
7072

7173
def __exit__(self, *args, **kwargs):

0 commit comments

Comments
 (0)