-
Notifications
You must be signed in to change notification settings - Fork 92
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
DeprecationWarning when used with pytest #466
Comments
There is an old (and long fixed) pytest bug, which may be related - can you please check which version of pytest you use? |
Showing DeprecationWarnings from system libraries has been enabled in Pytest 3.8. I'm running Pytest 4.1.1, the latest version on Conda. |
I was able to silence the warning with a filter in the configuration file, as described on the same Pytest page. But if pytest is directly importing the |
Ah, ok - I had used an older version of pytest, now I see the warning, too, thanks! |
Hm, I didn't succeed in filtering out the warning so far (other than in the config file or on the command line) - maybe I'm doing something wrong. I will check again another day. |
I had another try, and couldn't get it to work - either I'm doing something wrong, or this has to be fixed in pytest itself. I'm out of ideas right now. @jmcgeheeiv - any thoughts? |
# pyfakefs/fake_filesystem_unittest.py
# line 482
with warnings.catch_warnings():
warnings.simplefilter("ignore")
modules = {name: mod for name, mod in module.__dict__.items()
if is_fs_module(mod, name)} |
@diefans - thanks! I will have a look at this sometime next week, I'm traveling right now. |
I'm sorry, but I do not see what the problem could be. |
When I put |
@diefans - thanks for that - this works nicely! I obviously had put the filter into the wrong place. |
Describe the bug
Using pyfakefs with pytest produces a deprecation warning about the
compiler
package as soon as a test depends on thefs
fixture.How To Reproduce
Put the following into test_foo.py:
Then run pytest test_foo.py.
Your enviroment
Please run the following and paste the output.
The text was updated successfully, but these errors were encountered: