diff --git a/doc/source/development.environment.rst b/doc/source/development.environment.rst index d8b1020c6b..52a674dbed 100644 --- a/doc/source/development.environment.rst +++ b/doc/source/development.environment.rst @@ -141,8 +141,9 @@ documentation in that environment. Running unit tests ================== -See :doc:`unit_tests` for details. +See `Running Python Unit Tests`_. +.. _`Running Python Unit Tests`: http://docs.openstack.org/infra/manual/python.html#running-python-unit-tests Using a remote debugger ======================= diff --git a/doc/source/index.rst b/doc/source/index.rst index 8ec12a237c..3d0bbf7179 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -77,7 +77,6 @@ Introduction :maxdepth: 1 development.environment - unit_tests APIs Development diff --git a/doc/source/unit_tests.rst b/doc/source/unit_tests.rst deleted file mode 100644 index 436301d4cc..0000000000 --- a/doc/source/unit_tests.rst +++ /dev/null @@ -1,56 +0,0 @@ -Unit Tests -========== - -Nova contains a suite of unit tests, in the nova/tests directory. - -Preferred way to run the tests ------------------------------- - -The preferred way to run the unit tests is using ``tox``. See `the -unit testing section of the Testing wiki page`_ and `Nova's HACKING.rst`_ -for more information. Following are some simple examples. - -To run the style tests:: - - tox -e pep8 - -You can request multiple tests, separated by commas:: - - tox -e py27,pep8 - -.. _the unit testing section of the Testing wiki page: https://wiki.openstack.org/wiki/Testing#Unit_Tests -.. _Nova's HACKING.rst: http://git.openstack.org/cgit/openstack/nova/tree/HACKING.rst - -Running a subset of tests -------------------------- - -Instead of running all tests, you can specify an individual directory, file, -class, or method that contains test code. - -To run the tests in the ``nova/tests/unit/scheduler`` directory:: - - tox -e py27 nova.tests.unit.scheduler - -To run the tests in the ``nova/tests/unit/virt/libvirt/test_driver.py`` file:: - - tox -e py27 test_driver - -To run the tests in the ``CacheConcurrencyTestCase`` class in -``nova/tests/unit/virt/libvirt/test_driver.py``:: - - tox -e py27 test_driver.CacheConcurrencyTestCase - -To run the `ValidateIntegerTestCase.test_invalid_inputs` test method in -``nova/tests/unit/test_utils.py``:: - - tox -epy27 test_utils.ValidateIntegerTestCase.test_invalid_inputs - -Debugging strange test failures -------------------------------- - -Things to try when there are odd test failures such as failure on -jenkins but not locally. - -The venv can get stale. Force a refresh by adding the -r flag:: - - tox -r -e pep8