__method = "METHOD"
def loadTestsFromTestCase(self, testCaseClass):
"""Return a suite of all tests cases contained in testCaseClass"""
if issubclass(testCaseClass, suite.TestSuite):
raise TypeError("Test cases should not be derived from TestSuite." \
" Maybe you meant to derive from TestCase?")
testCaseNames = self.getTestCaseNames(testCaseClass)
#=======================================================================
# fix single test
#=======================================================================
if testCaseNames:
if self.__method in os.environ.keys() and os.environ[self.__method] and os.environ[self.__method] in testCaseNames:
testCaseNames = [os.environ[self.__method]]
if not testCaseNames and hasattr(testCaseClass, 'runTest'):
testCaseNames = ['runTest']
loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
return loaded_suite
-
Notifications
You must be signed in to change notification settings - Fork 0
License
ptphp/PtPy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published