changeset 641:15c20cfc6b22

create tmpdir for test as boilerplate
author Jeff Hammel <k0scist@gmail.com>
date Mon, 10 Mar 2014 16:40:47 -0700
parents 3059ee249888
children b52004eb7761
files .emacs
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.emacs	Tue Mar 04 16:19:37 2014 -0800
+++ b/.emacs	Mon Mar 10 16:40:47 2014 -0700
@@ -196,6 +196,7 @@
 (fset 'python-test "#!/usr/bin/env python
 
 import os
+import shutil
 import tempfile
 import unittest
 
@@ -203,7 +204,11 @@
 
 class Test(unittest.TestCase):
     def test_basic(self):
-        pass
+        tmpdir = tempfile.mkdtemp()
+        try:
+            pass
+        finally:
+            shutil.rmtree(tmpdir)
 
 if __name__ == '__main__':
     unittest.main()