TestParseOneVlanRange fails in python3.5

Bug #1559191 reported by Victor Morales on 2016-03-18
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Low
Dr. Jens Harbott

Bug Description

I know that python 3.5 is out of the scope but I noticed that this is the only unit test that fails in that version. In order to setup my env, I had to change the values of python3.4 for python3.5 in tox.ini file.

(py35)$ testr run TestParseOneVlanRange
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./neutron/tests/unit} --list
Guru mediation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports.
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./neutron/tests/unit} --load-list /var/folders/53/4xjcqmt56fb8bswzn3v4q5h80000gp/T/tmpyr72wx3d
Guru mediation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports.
======================================================================
FAIL: neutron.tests.unit.common.test_utils.TestParseOneVlanRange.test_parse_one_net_incomplete_range
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/neutron/neutron/tests/unit/common/test_utils.py", line 271, in test_parse_one_net_incomplete_range
    self.assertEqual(str(err), expected_msg)
  File "/opt/stack/neutron/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 362, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/neutron/.tox/py35/lib/python3.5/site-packages/testtools/testcase.py", line 447, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = "Invalid network VLAN range: 'net1:100' - 'not enough values to unpack (expected 3, got 2)'."
actual = "Invalid network VLAN range: 'net1:100' - 'need more than 2 values to unpack'."
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=1 encoding='UTF-8'>
Ran 9 tests in 0.246s (-0.097s)
FAILED (id=72, failures=1)

Changed in neutron:
assignee: nobody → Victor Morales (electrocucaracha)
Changed in neutron:
status: New → In Progress
tags: added: unittest
Changed in neutron:
importance: Undecided → Low
Changed in neutron:
assignee: Victor Morales (electrocucaracha) → Dr. Jens Rosenboom (j-rosenboom-j)

Reviewed: https://review.openstack.org/334265
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3a17c308a1249c613c9e563c2199ab420219996e
Submitter: Jenkins
Branch: master

commit 3a17c308a1249c613c9e563c2199ab420219996e
Author: Jens Rosenboom <email address hidden>
Date: Mon Jun 27 03:12:34 2016 +0200

    Do not depend on Python error strings in parse_network_vlan_range()

    Instead of using Python error strings in the error messages for
    parse_network_vlan_range(), which are unstable and not translatable,
    use our own fixed error message.

    Change-Id: Iae4484b0a9a983452812bc76b47f5e16850641d5
    Closes-Bug: 1559191

Changed in neutron:
status: In Progress → Fix Released

This issue was fixed in the openstack/neutron 9.0.0.0b2 development milestone.

tags: added: neutron-proactive-backport-potential

Change abandoned by Victor Morales (<email address hidden>) on branch: master
Review: https://review.openstack.org/294377
Reason: This has been solved in another patch[1]

[1] https://review.openstack.org/#/c/334265

tags: removed: neutron-proactive-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers