Ignore:
Timestamp:
09/08/09 08:32:03 (10 years ago)
Author:
b0rland_parpg
Message:

Ticket #67: Patch by b0rland

  • Moved GameObject? tests to a separate file and added more tests
  • Rewrote run_tests to automatically execute all tests from tests directory
  • Converted all tests into camelCase naming convention
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/run_tests.py

    r276 r279  
    55    return os.path.sep.join(path.split('/')) 
    66 
    7 _paths = ('../../engine/swigwrappers/python', '../../engine/extensions') 
     7_paths = ('../../engine/swigwrappers/python', '../../engine/extensions','tests') 
     8test_suite = unittest.TestSuite() 
     9 
    810for p in _paths: 
    911    if p not in sys.path: 
    1012        sys.path.append(_jp(p)) 
    1113 
    12 from tests.test_objects_base import * 
    13 from tests.test_crate import * 
     14for p in os.listdir("tests") : 
     15    if p[-3:] == ".py" : 
     16        test_suite.addTest(unittest.TestLoader().loadTestsFromName(p[:-3])) 
    1417 
    15 if __name__ == '__main__': 
    16     unittest.main() 
     18unittest.TextTestRunner(verbosity=2).run(test_suite) 
Note: See TracChangeset for help on using the changeset viewer.