Commit 113685e1 authored by Stephen Finucane's avatar Stephen Finucane

Deprecate testr and nose integration

These are not recommended for use in OpenStack anymore and both nose and
testr offer native setuptools commands that can be manually aliased to
'test' on a per-project basis if necessary. Deprecate with an eye to
removal in the future.

Change-Id: I753f2ffe8b223b180b8ed813d879b3a28b47a1ab
Signed-off-by: 's avatarStephen Finucane <sfinucan@redhat.com>
parent 73cc4189
......@@ -27,6 +27,7 @@ import email.errors
import os
import re
import sys
import warnings
import pkg_resources
import setuptools
......@@ -259,8 +260,14 @@ try:
"""Fallback test runner if testr is a no-go."""
command_name = 'test'
description = 'DEPRECATED: Run unit tests using nose'
def run(self):
warnings.warn('nose integration in pbr is deprecated. Please use '
'the native nose setuptools configuration or call '
'nose directly',
DeprecationWarning)
# Can't use super - base class old-style class
commands.nosetests.run(self)
......
......@@ -45,13 +45,14 @@ import distutils.errors
import logging
import os
import sys
import warnings
logger = logging.getLogger(__name__)
class TestrReal(cmd.Command):
description = "Run unit tests using testr"
description = "DEPRECATED: Run unit tests using testr"
user_options = [
('coverage', None, "Replace PYTHON with coverage and merge coverage "
......@@ -100,6 +101,11 @@ class TestrReal(cmd.Command):
def run(self):
"""Set up testr repo, then run testr."""
logger.debug("run called")
warnings.warn('testr integration in pbr is deprecated. Please use '
'the \'testr\' setup command or call testr directly',
DeprecationWarning)
if not os.path.isdir(".testrepository"):
self._run_testr("init")
......
---
deprecations:
- |
*testr* and *nose* integration has been deprecated. This feature allowed
*pbr* to dynamically configure the test runner used when running
``setup.py test``. However, this target has fallen out of favour in both
the OpenStack and broader Python ecosystem, and both *testr* and *nose*
offer native setuptools commands that can be manually aliased to ``test``
on a per-project basis, if necessary. This feature will be removed in a
future release.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment