Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Explicitly close files in the staticfiles tests.

  • Loading branch information...
commit 2048bbee8c17495d5156d40073715cb9d7511c5a 1 parent 20a7a24
@alex alex authored Alex Gaynor committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 tests/regressiontests/staticfiles_tests/
5 tests/regressiontests/staticfiles_tests/
@@ -197,9 +197,8 @@ def _get_file(self, filepath):
call_command('findstatic', filepath, all=False, verbosity=0, stdout=out)
lines = [l.strip() for l in out.readlines()]
- contents =
- smart_text(lines[1].strip()), "r", "utf-8").read()
- return contents
+ with[1].strip()), "r", "utf-8") as f:
+ return
def test_all_files(self):
Please sign in to comment.
Something went wrong with that request. Please try again.