summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2020-08-10 19:54:50 (GMT)
committerGitHub <noreply@github.com>2020-08-10 19:54:50 (GMT)
commit85fdafa6ea933aa0623f5d8297ab0f4b20866234 (patch)
tree822ce647d18fb960a1528882753698b7b686b288 /Modules
parenteaa551702d80fd67219c48ee6a13ffb571ca360b (diff)
downloadcpython-85fdafa6ea933aa0623f5d8297ab0f4b20866234.zip
cpython-85fdafa6ea933aa0623f5d8297ab0f4b20866234.tar.gz
cpython-85fdafa6ea933aa0623f5d8297ab0f4b20866234.tar.bz2
Replace import_fresh_module in decimal test files (GH-21815)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_decimal/tests/bench.py9
-rw-r--r--Modules/_decimal/tests/deccheck.py7
-rw-r--r--Modules/_decimal/tests/formathelper.py5
3 files changed, 9 insertions, 12 deletions
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py
index 3726db1..88fd7b5 100644
--- a/Modules/_decimal/tests/bench.py
+++ b/Modules/_decimal/tests/bench.py
@@ -7,13 +7,10 @@
import time
-try:
- from test.support import import_fresh_module
-except ImportError:
- from test.test_support import import_fresh_module
-C = import_fresh_module('decimal', fresh=['_decimal'])
-P = import_fresh_module('decimal', blocked=['_decimal'])
+import _decimal as C
+import _pydecimal as P
+
#
# NOTE: This is the pi function from the decimal documentation, modified
diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py
index 15f104d..0b2a1c4 100644
--- a/Modules/_decimal/tests/deccheck.py
+++ b/Modules/_decimal/tests/deccheck.py
@@ -43,7 +43,6 @@ from subprocess import PIPE, STDOUT
from queue import Queue, Empty
from threading import Thread, Event, Lock
-from test.support import import_fresh_module
from randdec import randfloat, all_unary, all_binary, all_ternary
from randdec import unary_optarg, binary_optarg, ternary_optarg
from formathelper import rand_format, rand_locale
@@ -52,8 +51,10 @@ from _pydecimal import _dec_from_triple
from _testcapi import decimal_as_triple
from _testcapi import decimal_from_triple
-C = import_fresh_module('decimal', fresh=['_decimal'])
-P = import_fresh_module('decimal', blocked=['_decimal'])
+import _decimal as C
+import _pydecimal as P
+
+
EXIT_STATUS = 0
diff --git a/Modules/_decimal/tests/formathelper.py b/Modules/_decimal/tests/formathelper.py
index 19b2aad..482e02a 100644
--- a/Modules/_decimal/tests/formathelper.py
+++ b/Modules/_decimal/tests/formathelper.py
@@ -31,11 +31,10 @@
import os, sys, locale, random
import platform, subprocess
-from test.support import import_fresh_module
from distutils.spawn import find_executable
-C = import_fresh_module('decimal', fresh=['_decimal'])
-P = import_fresh_module('decimal', blocked=['_decimal'])
+import _decimal as C
+import _pydecimal as P
windows_lang_strings = [