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-23 02:37:32 +0000
committergcode@loowis.durge.org <gcode@loowis.durge.org@67cdc799-7952-0410-af00-57a81ceafa0f>2012-12-23 02:37:32 +0000
commitf25723a8f7c74a3b7c048c447e0e199f2e0b2457 (patch)
tree22f38e4584954b217e8b29d79f22c78ba345ee19 /fs/tests
parent621c6b81e6f49223179aa1c0d0ceae17d3e8f6c1 (diff)
downloadpyfilesystem-f25723a8f7c74a3b7c048c447e0e199f2e0b2457.tar.gz
Change the way TempFS's _meta dict gets built so that it 'inherits' default values from OSFS's _meta (eliminates duplicate code)
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@843 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/tests')
-rw-r--r--fs/tests/test_fs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/tests/test_fs.py b/fs/tests/test_fs.py
index e54b8ac..8823523 100644
--- a/fs/tests/test_fs.py
+++ b/fs/tests/test_fs.py
@@ -124,3 +124,10 @@ class TestTempFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
td = self.fs._temp_dir
return os.path.exists(os.path.join(td, relpath(p)))
+ def test_invalid_chars(self):
+ super(TestTempFS, self).test_invalid_chars()
+
+ self.assertRaises(errors.InvalidCharsInPathError, self.fs.open, 'invalid\0file', 'wb')
+ self.assertFalse(self.fs.isvalidpath('invalid\0file'))
+ self.assert_(self.fs.isvalidpath('validfile'))
+ self.assert_(self.fs.isvalidpath('completely_valid/path/foo.bar'))