Example for running individual unit tests doesn't work

Bug #1334134 reported by Ralf Haferkamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Ralf Haferkamp

Bug Description

TESTING.rst in the neutron git repo has this examples for running individual unit tests:

  For example, the following would run only the JSONV2TestCase tests from
  neutron/tests/unit/test_api_v2.py::

        $ ./run_tests.sh neutron.tests.unit.test_api_v2:JSONV2TestCase

  or::

        $ ./tox neutron.tests.unit.test_api_v2:JSONV2TestCase

If I run this on my test system (openSUSE 13.1) it will not execute any test case:
====================================================
Running `OS_TEST_PATH=neutron/tests/unit tools/with_venv.sh python -m neutron.openstack.common.lockutils python setup.py testr --slowest --testr-args='--subunit neutron.tests.unit.test_api_v2:JSONV2TestCase'`
running testr
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
Slowest Tests

----------------------------------------------------------------------
Ran 0 tests in 7.737s

OK
====================================================

Simply replacing the ':' with a '.' works here.

Changed in neutron:
assignee: nobody → Ralf Haferkamp (rhafer)
status: New → In Progress
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-2
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/101896
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4675b462b6679b1123fd00a7da45b6472921deb1
Submitter: Jenkins
Branch: master

commit 4675b462b6679b1123fd00a7da45b6472921deb1
Author: Ralf Haferkamp <email address hidden>
Date: Mon Jun 23 14:27:55 2014 +0200

    Fix example for running individual tests

    The ':' syntax doesn't seem to work anymore. Additionally fix the "tox" call to
    not try to run it from the current working directory. It's usually installed
    somewhere in $PATH.

    Closes-Bug: #1334134
    Change-Id: Ie608cee2ac131941d6642e2560a84db55415654b

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.