mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-27 00:19:58 +03:00
Use teardown_method
This commit is contained in:
parent
a39d14648b
commit
f4d86e4f44
|
@ -276,7 +276,6 @@ class TestEmbeddable:
|
||||||
except Exception:
|
except Exception:
|
||||||
pytest.skip("Compiler could not be initialized")
|
pytest.skip("Compiler could not be initialized")
|
||||||
|
|
||||||
try:
|
|
||||||
with open("embed_pil.c", "w", encoding="utf-8") as fh:
|
with open("embed_pil.c", "w", encoding="utf-8") as fh:
|
||||||
home = sys.prefix.replace("\\", "\\\\")
|
home = sys.prefix.replace("\\", "\\\\")
|
||||||
fh.write(
|
fh.write(
|
||||||
|
@ -316,5 +315,6 @@ int main(int argc, char* argv[])
|
||||||
process = subprocess.Popen(["embed_pil.exe"], env=env)
|
process = subprocess.Popen(["embed_pil.exe"], env=env)
|
||||||
process.communicate()
|
process.communicate()
|
||||||
assert process.returncode == 0
|
assert process.returncode == 0
|
||||||
finally:
|
|
||||||
|
def teardown_method(self) -> None:
|
||||||
os.remove("embed_pil.c")
|
os.remove("embed_pil.c")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user