summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_macpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_macpath.py')
-rw-r--r--Lib/test/test_macpath.py110
1 files changed, 55 insertions, 55 deletions
diff --git a/Lib/test/test_macpath.py b/Lib/test/test_macpath.py
index e13865d..b5157bf 100644
--- a/Lib/test/test_macpath.py
+++ b/Lib/test/test_macpath.py
@@ -45,77 +45,77 @@ class MacPathTestCase(unittest.TestCase):
def test_split(self):
split = macpath.split
- self.assertEquals(split("foo:bar"),
- ('foo:', 'bar'))
- self.assertEquals(split("conky:mountpoint:foo:bar"),
- ('conky:mountpoint:foo', 'bar'))
+ self.assertEqual(split("foo:bar"),
+ ('foo:', 'bar'))
+ self.assertEqual(split("conky:mountpoint:foo:bar"),
+ ('conky:mountpoint:foo', 'bar'))
- self.assertEquals(split(":"), ('', ''))
- self.assertEquals(split(":conky:mountpoint:"),
- (':conky:mountpoint', ''))
+ self.assertEqual(split(":"), ('', ''))
+ self.assertEqual(split(":conky:mountpoint:"),
+ (':conky:mountpoint', ''))
- self.assertEquals(split(b"foo:bar"),
- (b'foo:', b'bar'))
- self.assertEquals(split(b"conky:mountpoint:foo:bar"),
- (b'conky:mountpoint:foo', b'bar'))
+ self.assertEqual(split(b"foo:bar"),
+ (b'foo:', b'bar'))
+ self.assertEqual(split(b"conky:mountpoint:foo:bar"),
+ (b'conky:mountpoint:foo', b'bar'))
- self.assertEquals(split(b":"), (b'', b''))
- self.assertEquals(split(b":conky:mountpoint:"),
- (b':conky:mountpoint', b''))
+ self.assertEqual(split(b":"), (b'', b''))
+ self.assertEqual(split(b":conky:mountpoint:"),
+ (b':conky:mountpoint', b''))
def test_join(self):
join = macpath.join
- self.assertEquals(join('a', 'b'), ':a:b')
- self.assertEquals(join('', 'a:b'), 'a:b')
- self.assertEquals(join('a:b', 'c'), 'a:b:c')
- self.assertEquals(join('a:b', ':c'), 'a:b:c')
- self.assertEquals(join('a', ':b', ':c'), ':a:b:c')
-
- self.assertEquals(join(b'a', b'b'), b':a:b')
- self.assertEquals(join(b'', b'a:b'), b'a:b')
- self.assertEquals(join(b'a:b', b'c'), b'a:b:c')
- self.assertEquals(join(b'a:b', b':c'), b'a:b:c')
- self.assertEquals(join(b'a', b':b', b':c'), b':a:b:c')
+ self.assertEqual(join('a', 'b'), ':a:b')
+ self.assertEqual(join('', 'a:b'), 'a:b')
+ self.assertEqual(join('a:b', 'c'), 'a:b:c')
+ self.assertEqual(join('a:b', ':c'), 'a:b:c')
+ self.assertEqual(join('a', ':b', ':c'), ':a:b:c')
+
+ self.assertEqual(join(b'a', b'b'), b':a:b')
+ self.assertEqual(join(b'', b'a:b'), b'a:b')
+ self.assertEqual(join(b'a:b', b'c'), b'a:b:c')
+ self.assertEqual(join(b'a:b', b':c'), b'a:b:c')
+ self.assertEqual(join(b'a', b':b', b':c'), b':a:b:c')
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'))
+ self.assertEqual(splitdrive(b"foo:bar"), (b'', b'foo:bar'))
+ self.assertEqual(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.assertEquals(splitext(b":foo.ext"), (b':foo', b'.ext'))
- self.assertEquals(splitext(b"foo:foo.ext"), (b'foo:foo', b'.ext'))
- self.assertEquals(splitext(b".ext"), (b'.ext', b''))
- self.assertEquals(splitext(b"foo.ext:foo"), (b'foo.ext:foo', b''))
- self.assertEquals(splitext(b":foo.ext:"), (b':foo.ext:', b''))
- self.assertEquals(splitext(b""), (b'', b''))
- self.assertEquals(splitext(b"foo.bar.ext"), (b'foo.bar', b'.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.assertEqual(splitext(b":foo.ext"), (b':foo', b'.ext'))
+ self.assertEqual(splitext(b"foo:foo.ext"), (b'foo:foo', b'.ext'))
+ self.assertEqual(splitext(b".ext"), (b'.ext', b''))
+ self.assertEqual(splitext(b"foo.ext:foo"), (b'foo.ext:foo', b''))
+ self.assertEqual(splitext(b":foo.ext:"), (b':foo.ext:', b''))
+ self.assertEqual(splitext(b""), (b'', b''))
+ self.assertEqual(splitext(b"foo.bar.ext"), (b'foo.bar', b'.ext'))
def test_ismount(self):
ismount = macpath.ismount
- self.assertEquals(ismount("a:"), True)
- self.assertEquals(ismount("a:b"), False)
- self.assertEquals(ismount("a:b:"), True)
- self.assertEquals(ismount(""), False)
- self.assertEquals(ismount(":"), False)
-
- self.assertEquals(ismount(b"a:"), True)
- self.assertEquals(ismount(b"a:b"), False)
- self.assertEquals(ismount(b"a:b:"), True)
- self.assertEquals(ismount(b""), False)
- self.assertEquals(ismount(b":"), False)
+ self.assertEqual(ismount("a:"), True)
+ self.assertEqual(ismount("a:b"), False)
+ self.assertEqual(ismount("a:b:"), True)
+ self.assertEqual(ismount(""), False)
+ self.assertEqual(ismount(":"), False)
+
+ self.assertEqual(ismount(b"a:"), True)
+ self.assertEqual(ismount(b"a:b"), False)
+ self.assertEqual(ismount(b"a:b:"), True)
+ self.assertEqual(ismount(b""), False)
+ self.assertEqual(ismount(b":"), False)
def test_normpath(self):
normpath = macpath.normpath