[Treepkg-commits] r112 - trunk/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jun 26 18:38:10 CEST 2008


Author: bh
Date: 2008-06-26 18:38:09 +0200 (Thu, 26 Jun 2008)
New Revision: 112

Modified:
   trunk/test/test_status.py
Log:
Use the FileTestMixin for the status tests, too.


Modified: trunk/test/test_status.py
===================================================================
--- trunk/test/test_status.py	2008-06-26 16:33:14 UTC (rev 111)
+++ trunk/test/test_status.py	2008-06-26 16:38:09 UTC (rev 112)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 by Intevation GmbH
+# Copyright (C) 2007, 2008 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 #
@@ -15,17 +15,14 @@
 from treepkg.status import RevisionStatus, Status, EnumFieldDesc
 from treepkg.util import ensure_directory, writefile
 
+from filesupport import FileTestMixin
 
 
-class TestStatus(unittest.TestCase):
 
-    def tempfilename(self):
-        tempdir = os.path.join(os.path.dirname(__file__), "temp")
-        ensure_directory(tempdir)
-        return os.path.join(tempdir, self.id())
+class TestStatus(unittest.TestCase, FileTestMixin):
 
     def setUp(self):
-        self.filename = self.tempfilename()
+        self.filename = self.temp_file_name("status")
         if os.path.exists(self.filename):
             os.remove(self.filename)
 



More information about the Treepkg-commits mailing list