From 3460198f6ba40a839f105c381f07179aba1e8c61 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 7 Jan 2018 17:54:31 +0200 Subject: bpo-31802: Fix importing native path module before importing os. (#4017) --- Lib/test/test_genericpath.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/test_genericpath.py') diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index 01e11da0980..ad5a59c44ed 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -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): -- cgit v1.2.3