summaryrefslogtreecommitdiff
path: root/fs/tests
diff options
context:
space:
mode:
authorgcode@loowis.durge.org <gcode@loowis.durge.org@67cdc799-7952-0410-af00-57a81ceafa0f>2012-12-22 23:08:15 +0000
committergcode@loowis.durge.org <gcode@loowis.durge.org@67cdc799-7952-0410-af00-57a81ceafa0f>2012-12-22 23:08:15 +0000
commitee51a735ac75774060f6f5ee84d81d1b37e85b6b (patch)
tree8d6a9a96763afef1413af358872e909993b13299 /fs/tests
parentb2271f489f93d56a42f45e865b1230e922594fa0 (diff)
downloadpyfilesystem-ee51a735ac75774060f6f5ee84d81d1b37e85b6b.tar.gz
Made normpath('/.') and normpath('/..') behave more consistently
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@841 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/tests')
-rw-r--r--fs/tests/test_path.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/tests/test_path.py b/fs/tests/test_path.py
index b4e062f..dc023a3 100644
--- a/fs/tests/test_path.py
+++ b/fs/tests/test_path.py
@@ -18,6 +18,7 @@ class TestPathFunctions(unittest.TestCase):
(".", ""),
("./", ""),
("", ""),
+ ("/.", "/"),
("/a/b/c", "/a/b/c"),
("a/b/c", "a/b/c"),
("a/b/../c/", "a/c"),
@@ -50,7 +51,9 @@ class TestPathFunctions(unittest.TestCase):
result = testpaths[-1]
self.assertEqual(pathjoin(*paths), result)
+ self.assertRaises(ValueError, pathjoin, "..")
self.assertRaises(ValueError, pathjoin, "../")
+ self.assertRaises(ValueError, pathjoin, "/..")
self.assertRaises(ValueError, pathjoin, "./../")
self.assertRaises(ValueError, pathjoin, "a/b", "../../..")
self.assertRaises(ValueError, pathjoin, "a/b/../../../d")