AssertionError

5 != 0 search by Google

args : tuple
('5 != 0',)

Traceback

  1. /usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments )

    self : _Outcome
    <unittest.case._Outcome object at 0x7fb0433d1110>
    test_case : Volumes
    test_create_with_tags_negative (c2tests.ec2.volumes.Volumes)
    isTest : bool
    True
    1. @contextlib.contextmanager
    2. def testPartExecutor(self, test_case, isTest=False):
    3. old_success = self.success
    4. self.success = True
    5. try:
    6. yield
    7. except KeyboardInterrupt:
    8. raise
    9. except SkipTest as e:
    10. self.success = False

    Locals

    exc_info : NoneType
    None
    old_success : bool
    True

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  2. /usr/local/lib/python3.7/unittest/case.py in run (arguments )

    self : Volumes
    test_create_with_tags_negative (c2tests.ec2.volumes.Volumes)
    result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    1. with outcome.testPartExecutor(self):
    2. self.setUp()
    3. if outcome.success:
    4. outcome.expecting_failure = expecting_failure
    5. with outcome.testPartExecutor(self, isTest=True):
    6. testMethod()
    7. outcome.expecting_failure = False
    8. with outcome.testPartExecutor(self):
    9. self.tearDown()

    Locals

    expecting_failure : bool
    False
    expecting_failure_class : bool
    False
    expecting_failure_method : bool
    False
    orig_result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    outcome : _Outcome
    <unittest.case._Outcome object at 0x7fb0433d1110>
    testMethod : method
    <bound method Volumes.test_create_with_tags_negative of <c2tests.ec2.volumes.Volumes testMethod=test_create_with_tags_negative>>

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  3. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/volumes.py in test_create_with_tags_negative (arguments )

    self : Volumes
    test_create_with_tags_negative (c2tests.ec2.volumes.Volumes)
    1. "TagSpecification.1.Tag.2.Key": "volume-key-2",
    2. "TagSpecification.1.Tag.2.Value": "volume-value-2",
    3. })
    4. volumes = self.get_all_volumes()
    5. self.assertEqual(len(volumes), 0)
    6. tags = self.get_all_tags()
    7. self.assertEqual(len(tags), 0)

    Locals

    volumes : ResultSet
    [Volume:vol-6F084960, Volume:vol-78A63140, Volume:vol-87DF2D40, Volume:vol-B180E520, Volume:vol-E6088A40]
    zones : ResultSet
    [Zone:az-1]

    Globals

    randint : method
    <bound method Random.randint of <random.Random object at 0x1886f00>>
  4. /usr/local/lib/python3.7/unittest/case.py in assertEqual (arguments )

    self : Volumes
    test_create_with_tags_negative (c2tests.ec2.volumes.Volumes)
    first : int
    5
    second : int
    0
    msg : NoneType
    None
    1. def assertEqual(self, first, second, msg=None):
    2. """Fail if the two objects are unequal as determined by the '=='
    3. operator.
    4. """
    5. assertion_func = self._getAssertEqualityFunc(first, second)
    6. assertion_func(first, second, msg=msg)
    7. def assertNotEqual(self, first, second, msg=None):
    8. """Fail if the two objects are equal as determined by the '!='
    9. operator.

    Locals

    assertion_func : method
    <bound method TestCase._baseAssertEqual of <c2tests.ec2.volumes.Volumes testMethod=test_create_with_tags_negative>>

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  5. /usr/local/lib/python3.7/unittest/case.py in _baseAssertEqual (arguments )

    self : Volumes
    test_create_with_tags_negative (c2tests.ec2.volumes.Volumes)
    first : int
    5
    second : int
    0
    msg : str
    5 != 0
    1. def _baseAssertEqual(self, first, second, msg=None):
    2. """The default assertEqual implementation, not type specific."""
    3. if not first == second:
    4. standardMsg = '%s != %s' % _common_shorten_repr(first, second)
    5. msg = self._formatMessage(msg, standardMsg)
    6. raise self.failureException(msg)
    7. def assertEqual(self, first, second, msg=None):
    8. """Fail if the two objects are unequal as determined by the '=='
    9. operator.

    Locals

    standardMsg : str
    5 != 0

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.

Environment

Time of report generation
2024-04-20 16:42:43
Python version
3.7.9 (default, Sep 21 2022, 19:11:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Path to executable
/root/c2tests/.venv/bin/python
Working directory
/root/c2tests
Arguments vector
  1. /root/c2tests/.venv/bin/c2tests
  2. run
  3. -s
  4. ec2