diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-20 09:47:55 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-20 09:47:55 (GMT) |
commit | a11865b8c6dff87bc18b23cded2ea554dd190bb7 (patch) | |
tree | c0d314322c6447786f98e95e54d48ffd8a4be696 /Lib/test/test_macpath.py | |
parent | ef7d67214a5b9d6a17e09dde0b27666100239f22 (diff) | |
download | cpython-a11865b8c6dff87bc18b23cded2ea554dd190bb7.zip cpython-a11865b8c6dff87bc18b23cded2ea554dd190bb7.tar.gz cpython-a11865b8c6dff87bc18b23cded2ea554dd190bb7.tar.bz2 |
Merged revisions 78249 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78249 | ezio.melotti | 2010-02-20 11:40:07 +0200 (Sat, 20 Feb 2010) | 1 line
Remove e assertIs definitions and use correct assert* methods.
........
Diffstat (limited to 'Lib/test/test_macpath.py')
-rw-r--r-- | Lib/test/test_macpath.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Lib/test/test_macpath.py b/Lib/test/test_macpath.py index e13865d..2c73758 100644 --- a/Lib/test/test_macpath.py +++ b/Lib/test/test_macpath.py @@ -29,12 +29,12 @@ class MacPathTestCase(unittest.TestCase): def test_commonprefix(self): commonprefix = macpath.commonprefix - self.assertTrue(commonprefix(["home:swenson:spam", "home:swen:spam"]) - == "home:swen") - self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:eggs"]) - == ":home:swen:") - self.assertTrue(commonprefix([":home:swen:spam", ":home:swen:spam"]) - == ":home:swen:spam") + self.assertEqual(commonprefix(["home:swenson:spam", "home:swen:spam"]), + "home:swen") + self.assertEqual(commonprefix([":home:swen:spam", ":home:swen:eggs"]), + ":home:swen:") + self.assertEqual(commonprefix([":home:swen:spam", ":home:swen:spam"]), + ":home:swen:spam") self.assertTrue(commonprefix([b"home:swenson:spam", b"home:swen:spam"]) == b"home:swen") @@ -45,13 +45,13 @@ class MacPathTestCase(unittest.TestCase): def test_split(self): split = macpath.split - self.assertEquals(split("foo:bar"), + self.assertEqual(split("foo:bar"), ('foo:', 'bar')) - self.assertEquals(split("conky:mountpoint:foo:bar"), + self.assertEqual(split("conky:mountpoint:foo:bar"), ('conky:mountpoint:foo', 'bar')) - self.assertEquals(split(":"), ('', '')) - self.assertEquals(split(":conky:mountpoint:"), + self.assertEqual(split(":"), ('', '')) + self.assertEqual(split(":conky:mountpoint:"), (':conky:mountpoint', '')) self.assertEquals(split(b"foo:bar"), @@ -79,21 +79,21 @@ class MacPathTestCase(unittest.TestCase): def test_splitdrive(self): splitdrive = macpath.splitdrive - self.assertEquals(splitdrive("foo:bar"), ('', 'foo:bar')) - self.assertEquals(splitdrive(":foo:bar"), ('', ':foo:bar')) + self.assertEqual(splitdrive("foo:bar"), ('', 'foo:bar')) + self.assertEqual(splitdrive(":foo:bar"), ('', ':foo:bar')) self.assertEquals(splitdrive(b"foo:bar"), (b'', b'foo:bar')) self.assertEquals(splitdrive(b":foo:bar"), (b'', b':foo:bar')) def test_splitext(self): splitext = macpath.splitext - self.assertEquals(splitext(":foo.ext"), (':foo', '.ext')) - self.assertEquals(splitext("foo:foo.ext"), ('foo:foo', '.ext')) - self.assertEquals(splitext(".ext"), ('.ext', '')) - self.assertEquals(splitext("foo.ext:foo"), ('foo.ext:foo', '')) - self.assertEquals(splitext(":foo.ext:"), (':foo.ext:', '')) - self.assertEquals(splitext(""), ('', '')) - self.assertEquals(splitext("foo.bar.ext"), ('foo.bar', '.ext')) + self.assertEqual(splitext(":foo.ext"), (':foo', '.ext')) + self.assertEqual(splitext("foo:foo.ext"), ('foo:foo', '.ext')) + self.assertEqual(splitext(".ext"), ('.ext', '')) + self.assertEqual(splitext("foo.ext:foo"), ('foo.ext:foo', '')) + self.assertEqual(splitext(":foo.ext:"), (':foo.ext:', '')) + self.assertEqual(splitext(""), ('', '')) + self.assertEqual(splitext("foo.bar.ext"), ('foo.bar', '.ext')) self.assertEquals(splitext(b":foo.ext"), (b':foo', b'.ext')) self.assertEquals(splitext(b"foo:foo.ext"), (b'foo:foo', b'.ext')) |