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