diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-02 14:26:15 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-04 02:11:31 +0200 |
commit | 8a2f7dce43617b773a6be425ea155812396d3856 (patch) | |
tree | 17ad88b4f1e7185b55f53074c39945015bc5611b /git/test/test_index.py | |
parent | a469af892b3e929cbe9d29e414b6fcd59bec246e (diff) | |
download | gitpython-8a2f7dce43617b773a6be425ea155812396d3856.tar.gz |
io: Wrap (probably) allconfig_writers in `with` blocks
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py index 01506c6f..34014064 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -412,10 +412,9 @@ class TestIndex(TestBase): uname = u"Thomas Müller" umail = "sd@company.com" - writer = rw_repo.config_writer() - writer.set_value("user", "name", uname) - writer.set_value("user", "email", umail) - writer.release() + with rw_repo.config_writer() as writer: + writer.set_value("user", "name", uname) + writer.set_value("user", "email", umail) self.assertEqual(writer.get_value("user", "name"), uname) # remove all of the files, provide a wild mix of paths, BaseIndexEntries, |