mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
use assert[Not]In where appropriate
A patch from Dave Malcolm.
This commit is contained in:
parent
a69ba65fdc
commit
577473fe68
75 changed files with 471 additions and 454 deletions
|
@ -481,14 +481,14 @@ class PosixPathTest(unittest.TestCase):
|
|||
self.assertRaises(TypeError, posixpath.normpath)
|
||||
|
||||
def test_abspath(self):
|
||||
self.assertTrue("foo" in posixpath.abspath("foo"))
|
||||
self.assertTrue(b"foo" in posixpath.abspath(b"foo"))
|
||||
self.assertIn("foo", posixpath.abspath("foo"))
|
||||
self.assertIn(b"foo", posixpath.abspath(b"foo"))
|
||||
|
||||
self.assertRaises(TypeError, posixpath.abspath)
|
||||
|
||||
def test_realpath(self):
|
||||
self.assertTrue("foo" in realpath("foo"))
|
||||
self.assertTrue(b"foo" in realpath(b"foo"))
|
||||
self.assertIn("foo", realpath("foo"))
|
||||
self.assertIn(b"foo", realpath(b"foo"))
|
||||
self.assertRaises(TypeError, posixpath.realpath)
|
||||
|
||||
if hasattr(os, "symlink"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue