summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dospath.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-10-10 18:17:08 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-10-10 18:17:08 (GMT)
commite893f2f3b409429f286ab2c9dd6eda43aca92726 (patch)
tree1de1687d5b8b2431b3d1409228dfb5204013ba0d /Lib/test/test_dospath.py
parent5430f4e9c8c05121ed5f6e5c0e3f20df3f64f6c1 (diff)
downloadcpython-e893f2f3b409429f286ab2c9dd6eda43aca92726.zip
cpython-e893f2f3b409429f286ab2c9dd6eda43aca92726.tar.gz
cpython-e893f2f3b409429f286ab2c9dd6eda43aca92726.tar.bz2
Remove more DOS support.
Diffstat (limited to 'Lib/test/test_dospath.py')
-rw-r--r--Lib/test/test_dospath.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/Lib/test/test_dospath.py b/Lib/test/test_dospath.py
deleted file mode 100644
index 6bc1a5b..0000000
--- a/Lib/test/test_dospath.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import dospath
-import unittest
-from test import test_support
-
-
-class DOSPathTestCase(unittest.TestCase):
-
- def test_abspath(self):
- self.assert_(dospath.abspath("C:\\") == "C:\\")
-
- def test_isabs(self):
- isabs = dospath.isabs
- self.assert_(isabs("c:\\"))
- self.assert_(isabs("\\\\conky\\mountpoint\\"))
- self.assert_(isabs("\\foo"))
- self.assert_(isabs("\\foo\\bar"))
- self.failIf(isabs("foo"))
- self.failIf(isabs("foo\\"))
- self.failIf(isabs("foo\\bar"))
- self.failIf(isabs("c:foo"))
- self.failIf(isabs("c:foo\\"))
- self.failIf(isabs("c:foo\\bar"))
-
- def test_commonprefix(self):
- commonprefix = dospath.commonprefix
- self.assert_(commonprefix(["/home/swenson/spam", "/home/swen/spam"])
- == "/home/swen")
- self.assert_(commonprefix(["\\home\\swen\\spam", "\\home\\swen\\eggs"])
- == "\\home\\swen\\")
- self.assert_(commonprefix(["/home/swen/spam", "/home/swen/spam"])
- == "/home/swen/spam")
-
- def test_split(self):
- split = dospath.split
- self.assertEquals(split("c:\\foo\\bar"),
- ('c:\\foo', 'bar'))
- self.assertEquals(split("\\\\conky\\mountpoint\\foo\\bar"),
- ('\\\\conky\\mountpoint\\foo', 'bar'))
-
- self.assertEquals(split("c:\\"), ('c:\\', ''))
- self.assertEquals(split("\\\\conky\\mountpoint\\"),
- ('\\\\conky\\mountpoint', ''))
-
- self.assertEquals(split("c:/"), ('c:/', ''))
- self.assertEquals(split("//conky/mountpoint/"),
- ('//conky/mountpoint', ''))
-
- def test_splitdrive(self):
- splitdrive = dospath.splitdrive
- self.assertEquals(splitdrive("c:\\foo\\bar"), ('c:', '\\foo\\bar'))
- self.assertEquals(splitdrive("c:/foo/bar"), ('c:', '/foo/bar'))
- self.assertEquals(splitdrive("foo\\bar"), ('', 'foo\\bar'))
- self.assertEquals(splitdrive("c:"), ('c:', ''))
-
-
-def test_main():
- test_support.run_unittest(DOSPathTestCase)
-
-
-if __name__ == "__main__":
- test_main()