bpo-31802: Fix importing native path module before importing os. (#4017)

This commit is contained in:
Serhiy Storchaka 2018-01-07 17:54:31 +02:00 committed by GitHub
parent e46a8af450
commit 3460198f6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 32 deletions

View file

@ -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):