Skip to content
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

resourcewarning: unclosed file #78

Closed
jugmac00 opened this issue Jul 1, 2020 · 2 comments · Fixed by #81
Closed

resourcewarning: unclosed file #78

jugmac00 opened this issue Jul 1, 2020 · 2 comments · Fixed by #81

Comments

@jugmac00
Copy link
Contributor

jugmac00 commented Jul 1, 2020

reproduce
tox -e py38

test_local_resources (test_bootstrap_flask.BootstrapTestCase) ... /usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/css/bootstrap.min.css'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/js/bootstrap.min.js'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/jquery.min.js'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok

Update
In order to use tox, pr #79 has to be merged, as tox is currently broken.

@greyli
Copy link
Member

greyli commented Jul 2, 2020

Fixed in #79.

@greyli greyli closed this as completed Jul 2, 2020
@jugmac00
Copy link
Contributor Author

jugmac00 commented Jul 2, 2020

Hi @greyli

the ResourceWarning is still present. In #79 I only fixed the tox environments, so we are able to run the tests locally.

When running the tests, .e.g with tox -e py38 the ResourceWarning still shows.

test_local_resources (test_bootstrap_flask.BootstrapTestCase) ... /usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/css/bootstrap.min.css'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/js/bootstrap.min.js'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.8/unittest/case.py:633: ResourceWarning: unclosed file <_io.BufferedReader name='/home/jugmac00/Projects/bootstrap-flask/flask_bootstrap/static/jquery.min.js'>
  method()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

I prepare a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants