summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/lockfile/fix-tests.patch
blob: 882a7dc2af718de373f6de3c7633648712abba17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/test/compliancetest.py b/test/compliancetest.py
index bf4e59c..f55e258 100644
--- a/test/compliancetest.py
+++ b/test/compliancetest.py
@@ -6,18 +6,19 @@ import lockfile
 
 
 class ComplianceTest(object):
-    def __init__(self):
-        self.saved_class = lockfile.LockFile
+    @classmethod
+    def setup_class(cls):
+        cls.saved_class = lockfile.LockFile
 
     def _testfile(self):
         """Return platform-appropriate file.  Helper for tests."""
         import tempfile
         return os.path.join(tempfile.gettempdir(), 'trash-%s' % os.getpid())
 
-    def setup(self):
+    def setup_method(self):
         lockfile.LockFile = self.class_to_test
 
-    def teardown(self):
+    def teardown_method(self):
         try:
             tf = self._testfile()
             if os.path.isdir(tf):