mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-31802: Fix importing native path module before importing os. (#4017)
This commit is contained in:
parent
e46a8af450
commit
3460198f6b
5 changed files with 42 additions and 32 deletions
|
@ -8,6 +8,7 @@ import sys
|
|||
import unittest
|
||||
import warnings
|
||||
from test import support
|
||||
from test.support.script_helper import assert_python_ok
|
||||
|
||||
|
||||
def create_file(filename, data=b'foo'):
|
||||
|
@ -486,6 +487,9 @@ class CommonTest(GenericTest):
|
|||
with self.assertRaisesRegex(TypeError, 'bytearray'):
|
||||
self.pathmodule.relpath(bytearray(b'foo'), bytearray(b'bar'))
|
||||
|
||||
def test_import(self):
|
||||
assert_python_ok('-S', '-c', 'import ' + self.pathmodule.__name__)
|
||||
|
||||
|
||||
class PathLikeTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue