Ignore:
Timestamp:
14/05/09 16:42:36 (11 years ago)
Author:
pjkersha
Message:

Reworking unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/__init__.py

    r4840 r5290  
    1 """NDG Security Unit test package 
     1"""NDG Security test package 
    22 
    33NERC Data Grid Project 
     
    99__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1010__revision__ = '$Id$' 
    11  
    12 import unittest 
    13 import logging 
    14 logging.basicConfig() 
    15  
    16 import os 
    17 from os.path import expandvars as xpdVars 
    18 from os.path import join as jnPath 
    19  
    20  
    21 class BaseTestCase(unittest.TestCase): 
    22     '''Convenience base class from which other unit tests can extend.  Its 
    23     sets the generic data directory path''' 
    24     configDirEnvVarName = 'NDGSEC_UNITTEST_CONFIG_DIR' 
    25      
    26     def setUp(self): 
    27         if BaseTestCase.configDirEnvVarName not in os.environ: 
    28             os.environ[BaseTestCase.configDirEnvVarName] = \ 
    29                 os.path.join(os.path.abspath(os.path.dirname(__file__)), 
    30                              'config') 
    31  
    32 mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.configDirEnvVarName], 
    33                                    file) 
    34  
Note: See TracChangeset for help on using the changeset viewer.