From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- testing/mozbase/mozproxy/tests/support.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 testing/mozbase/mozproxy/tests/support.py (limited to 'testing/mozbase/mozproxy/tests/support.py') diff --git a/testing/mozbase/mozproxy/tests/support.py b/testing/mozbase/mozproxy/tests/support.py new file mode 100644 index 0000000000..a3367852ad --- /dev/null +++ b/testing/mozbase/mozproxy/tests/support.py @@ -0,0 +1,14 @@ +import contextlib +import shutil +import tempfile + + +# This helper can be replaced by pytest tmpdir fixture +# once Bug 1536029 lands (@mock.patch disturbs pytest fixtures) +@contextlib.contextmanager +def tempdir(): + dest_dir = tempfile.mkdtemp() + try: + yield dest_dir + finally: + shutil.rmtree(dest_dir, ignore_errors=True) -- cgit v1.2.3