summaryrefslogtreecommitdiff
path: root/git/test/test_docs.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-01 18:20:13 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-01 18:25:57 +0200
commit9a521681ff8614beb8e2c566cf3c475baca22169 (patch)
tree77365cb808a255eb53889725bfce775b5090330e /git/test/test_docs.py
parentbdf1e68f6bec679edc3feb455596e18c387879c4 (diff)
downloadgitpython-9a521681ff8614beb8e2c566cf3c475baca22169.tar.gz
io, #519: ALL open() --> with open()
+ Some cases had restructuring of code.
Diffstat (limited to 'git/test/test_docs.py')
-rw-r--r--git/test/test_docs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/test/test_docs.py b/git/test/test_docs.py
index a6e92543..8a2dff0f 100644
--- a/git/test/test_docs.py
+++ b/git/test/test_docs.py
@@ -53,7 +53,8 @@ class Tutorials(TestBase):
# ![5-test_init_repo_object]
# [6-test_init_repo_object]
- repo.archive(open(join(rw_dir, 'repo.tar'), 'wb'))
+ with open(join(rw_dir, 'repo.tar'), 'wb') as fp:
+ repo.archive(fp)
# ![6-test_init_repo_object]
# repository paths