Python unittest.TestCase.__init__() Examples
The following are 10
code examples of unittest.TestCase.__init__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
unittest.TestCase
, or try the search function
.
Example #1
Source File: online.py From scrapy-cluster with MIT License | 5 votes |
def __init__(self, name, redis_conn): self.redis_conn = redis_conn TestCase.__init__(self, name)
Example #2
Source File: api_test_base.py From aliyun-tablestore-python-sdk with MIT License | 5 votes |
def __init__(self, methodName=None): TestCase.__init__(self, methodName=methodName) self.start_time = 0 self.logger = logging.getLogger('APITestBase') self.logger.setLevel(logging.INFO) fh = logging.FileHandler('tablestore_sdk_test.log') fh.setLevel(logging.INFO) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh.setFormatter(formatter) self.logger.addHandler(fh)
Example #3
Source File: test_testing.py From eliot with Apache License 2.0 | 5 votes |
def __init__(self, message, expectedFields): TestCase.__init__(self) self.message = message self.expectedFields = expectedFields
Example #4
Source File: test_convert_lenet5.py From mxnet_to_onnx with Apache License 2.0 | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) # self.tearDown = lambda: subprocess.call("rm -f *.gz *-symbol.json *.params *.onnx", shell=True)
Example #5
Source File: test.py From grease with MIT License | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) self.configuration = None self.enabled = False self.mock_data = {} self.expected_data = {} self.ioc = GreaseContainer() self.detect = Detect(self.ioc)
Example #6
Source File: comparison.py From holoviews with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) registry = Comparison.register() for k, v in registry.items(): self.addTypeEqualityFunc(k, v)
Example #7
Source File: comparison.py From geoviews with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) registry = Comparison.register() for k, v in registry.items(): self.addTypeEqualityFunc(k, v)
Example #8
Source File: test_interaction.py From dizzy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, arg): self.maxDiff = None TestCase.__init__(self, arg)
Example #9
Source File: base.py From alibabacloud-python-sdk-v2 with Apache License 2.0 | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) if sys.version_info[0] == 2: self.assertRegex = self.assertRegexpMatches self._init_env()
Example #10
Source File: base.py From alibabacloud-python-sdk-v2 with Apache License 2.0 | 5 votes |
def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) alibabacloud.utils._test_flag = True if sys.version_info[0] == 2: self.assertRegex = self.assertRegexpMatches self._sdk_config = self._init_sdk_config() self.access_key_id = self._read_key_from_env_or_config("ACCESS_KEY_ID") self.access_key_secret = self._read_key_from_env_or_config("ACCESS_KEY_SECRET") self.region_id = self._read_key_from_env_or_config("REGION_ID") self.ecs = self._get_ecs_resource()