upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / python-jinja / repos / community-any / pytest-7.2.patch
blob3f08a92ecc34abe91ab6b37d240fcc654b6f99a8
1 From 3fadee01b712580d811bdd2cb06cd8a1b5ee0821 Mon Sep 17 00:00:00 2001
2 From: David Lord <davidism@gmail.com>
3 Date: Thu, 29 Dec 2022 10:39:00 -0800
4 Subject: [PATCH] update dependencies
6 ---
7 tests/test_loader.py | 6 ++++--
8 1 file changed, 4 insertions(+), 2 deletions(-)
10 diff --git a/tests/test_loader.py b/tests/test_loader.py
11 index 04c921d..77d686e 100644
12 --- a/tests/test_loader.py
13 +++ b/tests/test_loader.py
14 @@ -183,6 +183,7 @@ class TestFileSystemLoader:
16 class TestModuleLoader:
17 archive = None
18 + mod_env = None
20 def compile_down(self, prefix_loader, zip="deflated"):
21 log = []
22 @@ -196,13 +197,14 @@ class TestModuleLoader:
23 self.mod_env = Environment(loader=loaders.ModuleLoader(self.archive))
24 return "".join(log)
26 - def teardown(self):
27 - if hasattr(self, "mod_env"):
28 + def teardown_method(self):
29 + if self.archive is not None:
30 if os.path.isfile(self.archive):
31 os.remove(self.archive)
32 else:
33 shutil.rmtree(self.archive)
34 self.archive = None
35 + self.mod_env = None
37 def test_log(self, prefix_loader):
38 log = self.compile_down(prefix_loader)