Commit Graph

7 Commits

Author SHA1 Message Date
Dirk Mueller a4f27ca397 Skip test for testr hook being installed when testr is not available
pbr only depends on testrepository in the test requirements, so
packaging efforts can decide to skip the dependency if they want to.
As stestr is going to replace testrepository going forward, it makes
sense to make dependencies to testrepository optional.

Skip the test that requires testrepository in that scenario.

Change-Id: I28c30411a5a6fdb071ebcc35e65ce1f4f1242498
2018-09-14 23:16:31 +02:00
Stephen Finucane 32c90ba598 Remove support for command hooks
distutils2 is long dead and many of its best ideas have been
incorporated into setuptools. One of the ideas that *has not* been
incorporated is the idea of command hooks, of either the pre or post
kind. pbr is still carrying the code for this, and there are several
issues with this:

- No one is using this functionality in OpenStack and, given the
  complete lack of documentation on the matter, it's very doubtful that
  it's being used anywhere else [1]
- It's causing issues for projects attempting to hook into the
  'distutils.commands' entry point on Python 2.7, which it seems no else
  must have attempted yet [2].
- distutils2 is dead and advanced features like this that we don't
  explicitly need should not be retained

We could attempt to fix this but why bother? Good riddance, I say.

[1] http://codesearch.openstack.org/?q=pre_hook%5C.&i=nope&files=&repos=
[2] http://codesearch.openstack.org/?q=distutils.commands&i=nope&files=&repos=

Change-Id: I01f657034cffbf55ce830b7e8dbb6b3d94c1fd18
2017-10-09 10:48:33 +01:00
Cao Xuan Hoang 8f1e6dc73f Clean imports in code
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: Iab667c04f4aa57d0c8c882144a550443dacc8f05
2016-11-17 09:45:29 +07:00
Robert Collins 82f3b535c0 Better diagnostics on test failure
I was tracking down some test failures, which turned out to be a
missing Python.h, but this was hard to figure out without the stderr
output.

Change-Id: I0d0cf2440f5cd8b6ba3c0278fe7be5006a602a34
2015-04-14 13:49:57 +12:00
Monty Taylor 1f730e2580 Move base test case logic out of __init__.py
It's an antipattern to have functional code in an __init__.py. Move it
into base.py to be less anti.

Change-Id: Ib4db548b78e4e760d94099596a3c495a839836dc
2013-10-28 09:04:28 +13:00
Robert Collins 0ff4fe1a76 Add a test for command registration.
This would be better as a direct unit test, but I can't see where
thats done; and setuptools doesn't seem super friendly to that.

There are more commands that can be tested, but this seemed like a
good place to start.

Change-Id: I433880d9b08d07de0194450bbc90a423554e347c
2013-09-30 16:53:39 +13:00
Monty Taylor 71bea435b6 Move d2to1 more into the source tree
When we merged in d2to1, we kept it separate, but I don't think there
is a great benefit to doing that.

Change-Id: I3972b3132619e8e2dd7e362ca5fe9d1e3add43b8
2013-07-21 10:20:03 -07:00