-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python312Packages.lockfile: Remove usage of nose; modernize (#343765)
- Loading branch information
Showing
2 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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): |