diff --git a/tests/test_feed.py b/tests/test_feed.py index 664b3af..ffd8e4b 100644 --- a/tests/test_feed.py +++ b/tests/test_feed.py @@ -134,13 +134,14 @@ class TestSequenceFunctions(unittest.TestCase): def test_atomFeedFile(self): fg = self.fg - _, filename = tempfile.mkstemp() + fh, filename = tempfile.mkstemp() fg.atom_file(filename=filename, pretty=True, xml_declaration=False) with open(filename, "r") as myfile: atomString = myfile.read().replace('\n', '') self.checkAtomString(atomString) + os.close(fh) os.remove(filename) def test_atomFeedString(self): diff --git a/tests/test_main.py b/tests/test_main.py index 7f528ef..a6c6b88 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -31,10 +31,11 @@ class TestSequenceFunctions(unittest.TestCase): def test_file(self): for extemsion in '.atom', '.rss': - _, filename = tempfile.mkstemp(extemsion) + fh, filename = tempfile.mkstemp(extemsion) sys.argv = ['feedgen', filename] try: __main__.main() except: assert False + os.close(fh) os.remove(filename)