代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/mozjs102 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1af9fdd2124547099eb0cf5a71b513ef5592dbf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Tue, 10 Aug 2021 00:00:50 +0200
Subject: [PATCH] Tests: Use native TemporaryDirectory
Without ugly wrapper for Py < 3.2 that doesn't work half of the times...
---
js/src/jit-test/jit_test.py | 2 +-
js/src/tests/jstests.py | 2 +-
js/src/tests/lib/tempfile.py | 17 +----------------
3 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/js/src/jit-test/jit_test.py b/js/src/jit-test/jit_test.py
index f5d7794..8d443aa 100755
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -38,7 +38,7 @@ from lib.tests import (
get_environment_overlay,
change_env,
)
-from lib.tempfile import TemporaryDirectory
+from tempfile import TemporaryDirectory
def which(name):
diff --git a/js/src/tests/jstests.py b/js/src/tests/jstests.py
index 6fa2f5f..53ceff6 100755
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -37,7 +37,7 @@ from lib.tests import (
from lib.results import ResultsSink, TestOutput
from lib.progressbar import ProgressBar
from lib.adaptor import xdr_annotate
-from lib.tempfile import TemporaryDirectory
+from tempfile import TemporaryDirectory
if sys.platform.startswith("linux") or sys.platform.startswith("darwin"):
from lib.tasks_unix import run_all_tests
diff --git a/js/src/tests/lib/tempfile.py b/js/src/tests/lib/tempfile.py
index ecc21c9..f0a1fa3 100644
--- a/js/src/tests/lib/tempfile.py
+++ b/js/src/tests/lib/tempfile.py
@@ -2,19 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
-
-try:
- # Python 3.2
- from tempfile import TemporaryDirectory
-except ImportError:
- import tempfile
- import shutil
- from contextlib import contextmanager
-
- @contextmanager
- def TemporaryDirectory(*args, **kwds):
- d = tempfile.mkdtemp(*args, **kwds)
- try:
- yield d
- finally:
- shutil.rmtree(d)
+from tempfile import TemporaryDirectory
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。