| Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5944/com/win32com/test
Modified Files:
	testall.py 
Log Message:
hook the directsound tests into the main test suite
Index: testall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testall.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** testall.py	26 Nov 2008 08:52:32 -0000	1.31
--- testall.py	8 Jan 2009 04:22:04 -0000	1.32
***************
*** 82,85 ****
--- 82,87 ----
          ExecuteSilentlyIfOK(cmd, self)
  
+ # This is a list of "win32com.test.???" module names, optionally with a
+ # function in that module if the module isn't unitest based...
  unittest_modules = [
          # Level 1 tests.
***************
*** 99,102 ****
--- 101,117 ----
  ]
  
+ # A list of other unittest modules we use - these are fully qualified module
+ # names and the module is assumed to be unittest based.
+ unittest_other_modules = [
+         # Level 1 tests.
+         """win32com.directsound.test.ds_test
+         """.split(),
+         # Level 2 tests.
+         [],
+         # Level 3 tests.
+         []
+ ]
+ 
+ 
  output_checked_programs = [
          # Level 1 tests.
***************
*** 171,174 ****
--- 186,206 ----
          for test_class in custom_test_cases[i]:
              suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_class))
+     # other "normal" unittest modules.
+     for i in range(testLevel):
+         for mod_name in unittest_other_modules[i]:
+             try:
+                 __import__(mod_name)
+             except:
+                 import_failures.append((mod_name, sys.exc_info()[:2]))
+                 continue
+             
+             mod = sys.modules[mod_name]
+             if hasattr(mod, "suite"):
+                 test = mod.suite()
+             else:
+                 test = loader.loadTestsFromModule(mod)
+             assert test.countTestCases() > 0, "No tests loaded from %r" % mod
+             suite.addTest(test)
+ 
      return suite, import_failures
  
 |