Replace import_fresh_module in decimal test files (GH-21815)

This commit is contained in:
Stefan Krah 2020-08-10 21:54:50 +02:00 committed by GitHub
parent eaa551702d
commit 85fdafa6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 12 deletions

View File

@ -7,13 +7,10 @@
import time 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']) import _decimal as C
P = import_fresh_module('decimal', blocked=['_decimal']) import _pydecimal as P
# #
# NOTE: This is the pi function from the decimal documentation, modified # NOTE: This is the pi function from the decimal documentation, modified

View File

@ -43,7 +43,6 @@ from subprocess import PIPE, STDOUT
from queue import Queue, Empty from queue import Queue, Empty
from threading import Thread, Event, Lock 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 randfloat, all_unary, all_binary, all_ternary
from randdec import unary_optarg, binary_optarg, ternary_optarg from randdec import unary_optarg, binary_optarg, ternary_optarg
from formathelper import rand_format, rand_locale 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_as_triple
from _testcapi import decimal_from_triple from _testcapi import decimal_from_triple
C = import_fresh_module('decimal', fresh=['_decimal']) import _decimal as C
P = import_fresh_module('decimal', blocked=['_decimal']) import _pydecimal as P
EXIT_STATUS = 0 EXIT_STATUS = 0

View File

@ -31,11 +31,10 @@
import os, sys, locale, random import os, sys, locale, random
import platform, subprocess import platform, subprocess
from test.support import import_fresh_module
from distutils.spawn import find_executable from distutils.spawn import find_executable
C = import_fresh_module('decimal', fresh=['_decimal']) import _decimal as C
P = import_fresh_module('decimal', blocked=['_decimal']) import _pydecimal as P
windows_lang_strings = [ windows_lang_strings = [