Skip to content

Commit

Permalink
Merge pull request #2475 from ant31/master
Browse files Browse the repository at this point in the history
[wip] Fix ignore_path condition
  • Loading branch information
nicoddemus authored Jul 3, 2017
2 parents 6e2b5a3 + c578418 commit 6908d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,13 @@ def pytest_runtestloop(session):


def pytest_ignore_collect(path, config):
p = path.dirpath()
ignore_paths = config._getconftest_pathlist("collect_ignore", path=p)
ignore_paths = config._getconftest_pathlist("collect_ignore", path=path.dirpath())
ignore_paths = ignore_paths or []
excludeopt = config.getoption("ignore")
if excludeopt:
ignore_paths.extend([py.path.local(x) for x in excludeopt])

if path in ignore_paths:
if py.path.local(path) in ignore_paths:
return True

# Skip duplicate paths.
Expand Down
1 change: 1 addition & 0 deletions changelog/2475.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue where paths collected by pytest could have triple leading ``/`` characters.

0 comments on commit 6908d93

Please sign in to comment.