mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21743)
This commit is contained in:
parent
52f98424a5
commit
79bb2c93f2
20 changed files with 73 additions and 56 deletions
|
@ -15,10 +15,10 @@ import random
|
|||
import sys
|
||||
import unittest
|
||||
from test import support
|
||||
from test.support import import_helper
|
||||
|
||||
from decimal import Decimal
|
||||
from fractions import Fraction
|
||||
from test import support
|
||||
|
||||
|
||||
# Module to be tested.
|
||||
|
@ -179,8 +179,10 @@ class _DoNothing:
|
|||
# We prefer this for testing numeric values that may not be exactly equal,
|
||||
# and avoid using TestCase.assertAlmostEqual, because it sucks :-)
|
||||
|
||||
py_statistics = support.import_fresh_module('statistics', blocked=['_statistics'])
|
||||
c_statistics = support.import_fresh_module('statistics', fresh=['_statistics'])
|
||||
py_statistics = import_helper.import_fresh_module('statistics',
|
||||
blocked=['_statistics'])
|
||||
c_statistics = import_helper.import_fresh_module('statistics',
|
||||
fresh=['_statistics'])
|
||||
|
||||
|
||||
class TestModules(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue