From 46a0be7f7df62961cacdc952b4263b604a4ae983 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Thu, 8 Jun 2017 23:35:36 +0200 Subject: Clean up temp file after test --- tests/addressbook/abook_test.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') 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'), -- cgit v1.2.3