def test_camelcase_to_underscores(): tests = [ ('', ''), ('test_me', 'test_me'), ('testMe', 'test_me'), ('TestMe', 'test_me'), ('Test4Me', 'test4_me')] for test in tests: assert utils.camelcase_to_underscores(test[0]) == test[1]
def __init__(self, args): ''' Ctor, caches the arguments used to run the application, and grabs any optional test arguments. ''' # pylint: disable=invalid-name self.TEST_NAME = utils.camelcase_to_underscores(self.__class__.__name__) self.args = args utils.process_optargs(self.TEST_OPTARGS, self.TEST_NAME, self) # For accumulating run times: self.total_time = 0 self.start_time = 0 # For accumulating number of runs: self.total_runs = 0