mirror of https://github.com/python/cpython
#16309: avoid using deprecated method and turn docstring in a comment.
This commit is contained in:
parent
588090ff39
commit
32f4e6e991
|
@ -218,11 +218,11 @@ class CmdLineTest(unittest.TestCase):
|
||||||
self.assertIn(path2.encode('ascii'), out)
|
self.assertIn(path2.encode('ascii'), out)
|
||||||
|
|
||||||
def test_empty_PYTHONPATH_issue16309(self):
|
def test_empty_PYTHONPATH_issue16309(self):
|
||||||
"""On Posix, it is documented that setting PATH to the
|
# On Posix, it is documented that setting PATH to the
|
||||||
empty string is equivalent to not setting PATH at all,
|
# empty string is equivalent to not setting PATH at all,
|
||||||
which is an exception to the rule that in a string like
|
# which is an exception to the rule that in a string like
|
||||||
"/bin::/usr/bin" the empty string in the middle gets
|
# "/bin::/usr/bin" the empty string in the middle gets
|
||||||
interpreted as '.'"""
|
# interpreted as '.'
|
||||||
code = """if 1:
|
code = """if 1:
|
||||||
import sys
|
import sys
|
||||||
path = ":".join(sys.path)
|
path = ":".join(sys.path)
|
||||||
|
@ -232,7 +232,7 @@ class CmdLineTest(unittest.TestCase):
|
||||||
rc2, out2, err2 = assert_python_ok('-c', code)
|
rc2, out2, err2 = assert_python_ok('-c', code)
|
||||||
# regarding to Posix specification, outputs should be equal
|
# regarding to Posix specification, outputs should be equal
|
||||||
# for empty and unset PYTHONPATH
|
# for empty and unset PYTHONPATH
|
||||||
self.assertEquals(out1, out2)
|
self.assertEqual(out1, out2)
|
||||||
|
|
||||||
def test_displayhook_unencodable(self):
|
def test_displayhook_unencodable(self):
|
||||||
for encoding in ('ascii', 'latin-1', 'utf-8'):
|
for encoding in ('ascii', 'latin-1', 'utf-8'):
|
||||||
|
|
Loading…
Reference in New Issue