-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Resource Warning in unit tests #513
Comments
I can reproduce this. |
And now i can't with Closing this for now. |
During my work on #434 i saw them again. |
It is possible that 8f65855 fixed this. |
Still there, bug might be flask related: Python 3.5.2
Flask==0.11.1 # unittest
def setUp(self):
self.app = frontend.app.test_client()
def test_sass_route(self):
page = self.app.get("static/foo.css")
self.assertEqual(page.status_code, 200) # unittest output
test_css_route (tests.router.AssetRoutingTest) ... Python.framework/Versions/3.5/lib/python3.5/unittest/case.py:600: ResourceWarning: unclosed file <_io.BufferedReader name='static/foo.css'>
testMethod()
__ok__ Test runs successfully and OS file access output suggests the file gets closed before the python application quits. |
I'm fixing a bug on latest master and seeing this in a test I'm adding. Any known workarounds? |
I decided to use "ignore" as workaround. Would be thrilled if you have the time to fix this! |
This is very old and I can't reproduce it. I know people are reporting that this is still happening, if you have a concrete test case with Werkzeug (or from its tests), please open a new issue with exact details. |
Cloned Werkzeug just a little bit ago and ran run-tests.py and saw these pop up.
Reported Error:
Environment Information:
OS X 10.8.5 (12F45)
XTools
Python3.4
WerkZeug (cloned Today, I believe that makes it 0.10Dev but unsure)
The text was updated successfully, but these errors were encountered: