diff options
| author | Hai Shi <shihai1992@gmail.com> | 2020-08-04 00:47:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-03 18:47:42 +0200 |
| commit | bb0424b122e3d222a558bd4177ce37befd3e0347 (patch) | |
| tree | f5962e6276319558e48b702b6fa5a48f5c03ff6b /Lib/test/test_resource.py | |
| parent | a7f5d93bb6906d0f999248b47295d3a59b130f4d (diff) | |
| download | cpython-git-bb0424b122e3d222a558bd4177ce37befd3e0347.tar.gz | |
bpo-40275: Use new test.support helper submodules in tests (GH-21451)
Diffstat (limited to 'Lib/test/test_resource.py')
| -rw-r--r-- | Lib/test/test_resource.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index e5ece5284c..d909e316b7 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -2,9 +2,11 @@ import contextlib import sys import unittest from test import support +from test.support import import_helper +from test.support import os_helper import time -resource = support.import_module('resource') +resource = import_helper.import_module('resource') # This test is checking a few specific problem spots with the resource module. @@ -51,7 +53,7 @@ class ResourceTest(unittest.TestCase): limit_set = True except ValueError: limit_set = False - f = open(support.TESTFN, "wb") + f = open(os_helper.TESTFN, "wb") try: f.write(b"X" * 1024) try: @@ -77,7 +79,7 @@ class ResourceTest(unittest.TestCase): finally: if limit_set: resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max)) - support.unlink(support.TESTFN) + os_helper.unlink(os_helper.TESTFN) def test_fsize_toobig(self): # Be sure that setrlimit is checking for really large values |
