diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-06-08 23:35:36 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-06-08 23:35:36 +0200 |
commit | 46a0be7f7df62961cacdc952b4263b604a4ae983 (patch) | |
tree | 3eb4c16feeb68bf5d7c65243bea3d0a5e98b66b8 | |
parent | c22802fc6a7cdd5643d55a89f38b95d149fd2650 (diff) |
Clean up temp file after test
-rw-r--r-- | tests/addressbook/abook_test.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/addressbook/abook_test.py b/tests/addressbook/abook_test.py index 13eb9b5a..32be2cbe 100644 --- a/tests/addressbook/abook_test.py +++ b/tests/addressbook/abook_test.py @@ -3,6 +3,7 @@ # For further details see the COPYING file from __future__ import absolute_import +import os import tempfile import unittest @@ -31,6 +32,7 @@ class TestAbookAddressBook(unittest.TestCase): with tempfile.NamedTemporaryFile(delete=False) as tmp: tmp.write(data) path = tmp.name + self.addCleanup(os.unlink, path) addressbook = abook.AbookAddressBook(path) actual = addressbook.get_contacts() expected = [('me', 'me@example.com'), ('you', 'you@other.domain'), |