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

Commit

Permalink
Merge pull request #215 from Nurdok/path_case_win
Browse files Browse the repository at this point in the history
Inconsistent path cases in Windows cause tests to fail
  • Loading branch information
Nurdok committed Oct 14, 2016
2 parents b1a8b76 + 2a07536 commit d20c1e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/tests/test_cases/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# encoding: utf-8
# No docstring, so we can test D100
import os
import sys
from .expected import Expectation

Expand Down Expand Up @@ -362,5 +363,5 @@ def docstring_ignore_violations_of_pydocstyle_D400_and_PEP8_E501_but_catch_D401(
"""Runs something"""
pass

expect(__file__ if __file__[-1] != 'c' else __file__[:-1],
expect(os.path.normcase(__file__ if __file__[-1] != 'c' else __file__[:-1]),
'D100: Missing docstring in public module')
7 changes: 5 additions & 2 deletions src/tests/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@ def test_pep257(test_case):
locals=locals(),
fromlist=['expectation'],
level=1)
results = list(check([os.path.join(os.path.dirname(__file__),
'test_cases', test_case + '.py')],
test_case_dir = os.path.normcase(os.path.dirname(__file__))
test_case_file = os.path.join(test_case_dir,
'test_cases',
test_case + '.py')
results = list(check([test_case_file],
select=set(ErrorRegistry.get_error_codes())))
for error in results:
assert isinstance(error, Error)
Expand Down

0 comments on commit d20c1e7

Please sign in to comment.