Created
October 21, 2014 21:08
-
-
Save AlexanderS/b48d2ef33e41b5de1bc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d834fbef550c231572dd406868b6ece14105957a Mon Sep 17 00:00:00 2001 | |
From: Alexander Sulfrian <[email protected]> | |
Date: Tue, 21 Oct 2014 23:06:01 +0200 | |
Subject: [PATCH] testsuite: unlink temporary files | |
--- | |
.../Testsrc/Testlib/TestOptions/TestOptions.py | 9 ++++++--- | |
1 files changed, 6 insertions(+), 3 deletions(-) | |
diff --git a/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py b/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py | |
index f7d16cc..d15e992 100644 | |
--- a/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py | |
+++ b/testsuite/Testsrc/Testlib/TestOptions/TestOptions.py | |
@@ -394,9 +394,12 @@ class TestBasicOptions(OptionTestCase): | |
fh.write("test") | |
fh.close() | |
- parser.parse(["-C", config_file, "--test", name]) | |
- self.assertEqual(result.test.name, name) | |
- self.assertEqual(result.test.read(), "test") | |
+ try: | |
+ parser.parse(["-C", config_file, "--test", name]) | |
+ self.assertEqual(result.test.name, name) | |
+ self.assertEqual(result.test.read(), "test") | |
+ finally: | |
+ os.unlink(name) | |
@clean_environment | |
@make_config() | |
-- | |
1.7.2.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment