mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-20849)
This commit is contained in:
parent
5f190d2cc6
commit
f7ba40b505
17 changed files with 78 additions and 60 deletions
|
|
@ -6,6 +6,7 @@ import unittest
|
|||
from unittest import mock
|
||||
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
|
||||
|
||||
class PlatformTest(unittest.TestCase):
|
||||
|
|
@ -17,7 +18,7 @@ class PlatformTest(unittest.TestCase):
|
|||
def test_architecture(self):
|
||||
res = platform.architecture()
|
||||
|
||||
@support.skip_unless_symlink
|
||||
@os_helper.skip_unless_symlink
|
||||
def test_architecture_via_symlink(self): # issue3762
|
||||
with support.PythonSymlink() as py:
|
||||
cmd = "-c", "import platform; print(platform.architecture())"
|
||||
|
|
@ -281,8 +282,8 @@ class PlatformTest(unittest.TestCase):
|
|||
executable = sys.executable
|
||||
platform.libc_ver(executable)
|
||||
|
||||
filename = support.TESTFN
|
||||
self.addCleanup(support.unlink, filename)
|
||||
filename = os_helper.TESTFN
|
||||
self.addCleanup(os_helper.unlink, filename)
|
||||
|
||||
with mock.patch('os.confstr', create=True, return_value='mock 1.0'):
|
||||
# test os.confstr() code path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue