Changeset 68
- Timestamp:
- 12/24/05 09:19:06 (3 years ago)
- Files:
-
- branches/timcommithook/pyramid/test/tests.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/timcommithook/pyramid/test/tests.py
r64 r68 1 1 import unittest 2 from pyramid import flatteners, yamlRegistry as Y 2 from pyramid import flatteners, yamlRegistry as Y, build 3 import os.path 4 5 testdatadir = 'testdata' 6 TEMPFOLDER = '/tmp/pyramidtest' 7 8 def removeTemp(dir): 9 if os.path.isdir(dir): 10 os.rmdir(dir) 11 12 def makeAndCleanTemp(dir): 13 removeTemp(dir) 14 os.mkdir(dir) 3 15 4 16 class test_yamlRegistry(unittest.TestCase): … … 37 49 self.assertEqual(flatteners.flatten(data,ctx),expected) 38 50 39 51 52 class test_build(unittest.TestCase): 53 54 buildtestroot = 'build_tests' 55 testfolders = ['basic'] 56 57 def setUp(self): 58 """ Create test folders 59 """ 60 makeAndCleanTemp(TEMPFOLDER) 61 62 63 def test_basic(self): 64 """ 65 """ 66 for folder in self.testfolders: 67 fullpath = os.path.join(os.getcwd(),'pyramid','test',testdatadir,self.buildtestroot,folder) 68 fullpathCorrectResuts = os.path.join(os.getcwd(),'pyramid','test',testdatadir,self.buildtestroot,'%s-checked'%folder) 69 build.build(fullpath,TEMPFOLDER) 70 71 72 def tearDown(self): 73 """ remove all test folders 74 """ 75 #removetemp(TEMPFOLDER) 40 76 41 77 if __name__ == "__main__":
