Skip to content

Commit

Permalink
remember to close the file
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Oct 1, 2020
1 parent 1bfd4b4 commit d1fd56e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_js_reverse/tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ def test_reverse_js_file_save_with_output_path_option(self):
with mkdtemp(__name__) as js_output_path, override_settings(JS_REVERSE_OUTPUT_PATH=js_output_path):
call_command('collectstatic_js_reverse')

f = io.open(os.path.join(js_output_path, 'reverse.js'))
content1 = f.read()
with io.open(os.path.join(js_output_path, 'reverse.js')) as f:
content1 = f.read()

r2 = self.client.get('/jsreverse/')
content2 = r2.content.decode()
Expand Down

0 comments on commit d1fd56e

Please sign in to comment.