Mercurial > fife-parpg
comparison tests/swig_tests/vfs_tests.py @ 0:4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 29 Jun 2008 18:44:17 +0000 |
parents | |
children | d2f1e81fbe2c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4a0efb7baf70 |
---|---|
1 #!/usr/bin/env python | |
2 from swig_test_utils import * | |
3 | |
4 import sys | |
5 | |
6 class TestVfs(unittest.TestCase): | |
7 def setUp(self): | |
8 self.engine = getEngine(True) | |
9 self.vfs = self.engine.getVFS() | |
10 | |
11 def tearDown(self): | |
12 del self.engine | |
13 | |
14 def testListFiles(self): | |
15 self.vfs.listFiles('.') | |
16 self.assert_(self.vfs.listFiles('.')) | |
17 | |
18 def testListDirs(self): | |
19 print self.vfs.listDirectories('.') | |
20 self.assert_(self.vfs.listDirectories('.')) | |
21 | |
22 def testReadLines(self): | |
23 data = self.vfs.open('test_fife.py') | |
24 self.assert_(data.getDataInLines()) | |
25 del data | |
26 | |
27 def testReadBytes(self): | |
28 data = self.vfs.open('test_fife.py') | |
29 self.assert_(data.getDataInBytes()) | |
30 del data | |
31 | |
32 TEST_CLASSES = [TestVfs] | |
33 | |
34 if __name__ == '__main__': | |
35 unittest.main() |