Changeset 68

Show
Ignore:
Timestamp:
12/24/05 09:19:06 (3 years ago)
Author:
tim
Message:

added directory comparison testing - currently only does a build - use dircmp or some other for full testing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/timcommithook/pyramid/test/tests.py

    r64 r68  
    11import unittest 
    2 from pyramid import flatteners, yamlRegistry as Y 
     2from pyramid import flatteners, yamlRegistry as Y, build 
     3import os.path 
     4 
     5testdatadir = 'testdata' 
     6TEMPFOLDER = '/tmp/pyramidtest' 
     7 
     8def removeTemp(dir): 
     9    if os.path.isdir(dir): 
     10        os.rmdir(dir) 
     11 
     12def makeAndCleanTemp(dir): 
     13    removeTemp(dir) 
     14    os.mkdir(dir)      
    315 
    416class test_yamlRegistry(unittest.TestCase): 
     
    3749        self.assertEqual(flatteners.flatten(data,ctx),expected) 
    3850  
    39         
     51 
     52class 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)          
    4076     
    4177if __name__ == "__main__":