0 != 3 search by Google
/usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments ▶)
- @contextlib.contextmanager
- def testPartExecutor(self, test_case, isTest=False):
- old_success = self.success
- self.success = True
- try:
- yield
- except KeyboardInterrupt:
- raise
- except SkipTest as e:
- self.success = False
/usr/local/lib/python3.7/unittest/case.py in run (arguments ▶)
- with outcome.testPartExecutor(self):
- self.setUp()
- if outcome.success:
- outcome.expecting_failure = expecting_failure
- with outcome.testPartExecutor(self, isTest=True):
- testMethod()
- outcome.expecting_failure = False
- with outcome.testPartExecutor(self):
- self.tearDown()
/root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/extnetworks.py in test_attach_and_detach_extnetworks (arguments ▶)
- """Attach and detach all external networks for test user (be patient)"""
- extnetworks = self.conn.get_all_extnetworks()
- # NOTE: __NETWORK_NUM external networks must be preconfigured
- self.assertEquals(len(extnetworks), self.__NETWORK_NUM)
- # Attempt to create switches
- for extnetwork in extnetworks:
- switch = self.create_virtual_switch(
/usr/local/lib/python3.7/unittest/case.py in deprecated_func (arguments ▶)
- def _deprecate(original_func):
- def deprecated_func(*args, **kwargs):
- warnings.warn(
- 'Please use {0} instead.'.format(original_func.__name__),
- DeprecationWarning, 2)
- return original_func(*args, **kwargs)
- return deprecated_func
- # see #9424
- failUnlessEqual = assertEquals = _deprecate(assertEqual)
/usr/local/lib/python3.7/unittest/case.py in assertEqual (arguments ▶)
- def assertEqual(self, first, second, msg=None):
- """Fail if the two objects are unequal as determined by the '=='
- operator.
- """
- assertion_func = self._getAssertEqualityFunc(first, second)
- assertion_func(first, second, msg=msg)
- def assertNotEqual(self, first, second, msg=None):
- """Fail if the two objects are equal as determined by the '!='
- operator.
/usr/local/lib/python3.7/unittest/case.py in _baseAssertEqual (arguments ▶)
- def _baseAssertEqual(self, first, second, msg=None):
- """The default assertEqual implementation, not type specific."""
- if not first == second:
- standardMsg = '%s != %s' % _common_shorten_repr(first, second)
- msg = self._formatMessage(msg, standardMsg)
- raise self.failureException(msg)
- def assertEqual(self, first, second, msg=None):
- """Fail if the two objects are unequal as determined by the '=='
- operator.