1. sakito
  2. pyaws

Commits

book...@c395b634-4022-4dee-a7d9-fccbfec04023  committed 5a9c7e0

rename unittest for name colision.

  • Participants
  • Parent commits 7924f4e
  • Branches default

Comments (0)

Files changed (2)

File runtest.py

View file
+
+def regressionTest():
+	path = os.path.abspath(os.path.dirname(sys.argv[0]))   
+	files = os.listdir(os.path.join(path, 'tests'))
+	import pdb; pdb.set_trace()
+	test = re.compile("\.py$", re.IGNORECASE)		  
+	files = filter(test.search, files)					 
+	filenameToModuleName = lambda f: os.path.splitext(f)[0]
+	print filenameToModuleName
+	import pdb; pdb.set_trace()
+	moduleNames = map(filenameToModuleName, files)		 
+	modules = map(__import__, moduleNames)				 
+	load = unittest.defaultTestLoader.loadTestsFromModule  
+	return unittest.TestSuite(map(load, modules))		  
+
+if __name__ == "__main__":
+	import os, re, unittest, sys
+	unittest.main(defaultTest="regressionTest")

File unittest.py

-import os, re, unittest, sys
-
-def regressionTest():
-	path = os.path.abspath(os.path.dirname(sys.argv[0]))   
-	files = os.listdir(os.path.join(path, 'test'))
-	test = re.compile("\.py$", re.IGNORECASE)		  
-	files = filter(test.search, files)					 
-	filenameToModuleName = lambda f: os.path.splitext(f)[0]
-	print filenameToModuleName
-	import pdb; pdb.set_trace()
-	moduleNames = map(filenameToModuleName, files)		 
-	modules = map(__import__, moduleNames)				 
-	load = unittest.defaultTestLoader.loadTestsFromModule  
-	return unittest.TestSuite(map(load, modules))		  
-
-if __name__ == "__main__":
-	import pdb; pdb.set_trace()
-	unittest.main(defaultTest="regressionTest")