-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--ignore option doesn't work #846
Comments
How can this be reproduced? Seems to work fine here:
(I removed some lines from the output for brevity) |
Hmm, this basic case works for me in freshly created virtualenv, but does not in my projects' virtualenv. It looks like some of installed packages make an influence on that. |
I haven't looked at the implementation of Random guess: Maybe you're running the |
Looks like I found that package |
You can inherit the default behavior by using the new @pytest.mark.hookwrapper
def pytest_ignore_collect(path, config):
outcome = yield
if not output.get_result():
# not ignored by the default hook
if git_ignore_check_path(path):
outcome.force_result(True) But this will have to be implemented in pytest-gitignore, so I suggest creating an issue or opening a PR there. 😄 Closing this as I think there's not much more to do here. |
@nicoddemus - thank you for the example code! |
👍 😄 |
I'm using Python 3.4.3 and pytest 2.7.2.
Running
py.test --collect-only --ignore=path/to/file.py
collects tests for me that should be ignored.The text was updated successfully, but these errors were encountered: