summaryrefslogtreecommitdiff
path: root/fs/tests
diff options
context:
space:
mode:
authorwillmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f>2012-11-24 16:09:25 +0000
committerwillmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f>2012-11-24 16:09:25 +0000
commit17c48538ae56ddda5869613c33edee524b834658 (patch)
tree8ae0c7ce76332323e6b73bb0358bdac51b3466df /fs/tests
parent220721359b22654303dc0039fcd4f6ea5d304307 (diff)
downloadpyfilesystem-17c48538ae56ddda5869613c33edee524b834658.tar.gz
Fixes for backslashes on Linux issue, see Issue #139
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@829 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/tests')
-rw-r--r--fs/tests/test_path.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/tests/test_path.py b/fs/tests/test_path.py
index 639a4cc..40ec742 100644
--- a/fs/tests/test_path.py
+++ b/fs/tests/test_path.py
@@ -14,7 +14,7 @@ class TestPathFunctions(unittest.TestCase):
"""Testcases for FS path functions."""
def test_normpath(self):
- tests = [ ("\\a\\b\\c", "/a/b/c"),
+ tests = [ ("\\a\\b\\c", "\\a\\b\\c"),
(".", ""),
("./", ""),
("", ""),
@@ -22,7 +22,7 @@ class TestPathFunctions(unittest.TestCase):
("a/b/c", "a/b/c"),
("a/b/../c/", "a/c"),
("/","/"),
- (u"a/\N{GREEK SMALL LETTER BETA}\\c",u"a/\N{GREEK SMALL LETTER BETA}/c"),
+ (u"a/\N{GREEK SMALL LETTER BETA}/c",u"a/\N{GREEK SMALL LETTER BETA}/c"),
]
for path, result in tests:
self.assertEqual(normpath(path), result)
@@ -38,7 +38,7 @@ class TestPathFunctions(unittest.TestCase):
("a/b/c", "../d", "c", "a/b/d/c"),
("a/b/c", "../d", "/a", "/a"),
("aaa", "bbb/ccc", "aaa/bbb/ccc"),
- ("aaa", "bbb\ccc", "aaa/bbb/ccc"),
+ ("aaa", "bbb\\ccc", "aaa/bbb\\ccc"),
("aaa", "bbb", "ccc", "/aaa", "eee", "/aaa/eee"),
("a/b", "./d", "e", "a/b/d/e"),
("/", "/", "/"),
@@ -104,7 +104,7 @@ class TestPathFunctions(unittest.TestCase):
self.assertEquals(recursepath("/hello/world/",reverse=True),["/hello/world","/hello","/"])
self.assertEquals(recursepath("hello",reverse=True),["/hello","/"])
self.assertEquals(recursepath("",reverse=True),["/"])
-
+
def test_isdotfile(self):
for path in ['.foo',
'.svn',
@@ -112,14 +112,14 @@ class TestPathFunctions(unittest.TestCase):
'foo/bar/.svn',
'/foo/.bar']:
self.assert_(isdotfile(path))
-
+
for path in ['asfoo',
'df.svn',
'foo/er.svn',
'foo/bar/test.txt',
'/foo/bar']:
self.assertFalse(isdotfile(path))
-
+
def test_dirname(self):
tests = [('foo', ''),
('foo/bar', 'foo'),
@@ -129,7 +129,7 @@ class TestPathFunctions(unittest.TestCase):
('/', '/')]
for path, test_dirname in tests:
self.assertEqual(dirname(path), test_dirname)
-
+
def test_basename(self):
tests = [('foo', 'foo'),
('foo/bar', 'bar'),