Skip to content

Commit 196daf8

Browse files
committed
Move tests into project package.
There are several reasons for this. One is that the majority of OpenStack packages behave this way. The second is that it makes writing software that extends something easier to test (which is a clear usecase for openstackclient) And third, tests/__init__.py implies a global package named "tests" - which I'm pretty sure we're not providing. Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff
1 parent 108f78d commit 196daf8

15 files changed

Lines changed: 13 additions & 13 deletions

.testr.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[DEFAULT]
2-
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
2+
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
33
test_id_option=--load-list $IDFILE
44
test_list_option=--list

tests/common/test_clientmanager.py renamed to openstackclient/tests/common/test_clientmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515

1616
from openstackclient.common import clientmanager
17-
from tests import utils
17+
from openstackclient.tests import utils
1818

1919

2020
class Container(object):

tests/common/test_commandmanager.py renamed to openstackclient/tests/common/test_commandmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import mock
1717

1818
from openstackclient.common import commandmanager
19-
from tests import utils
19+
from openstackclient.tests import utils
2020

2121

2222
class FakeCommand(object):

tests/common/test_parseractions.py renamed to openstackclient/tests/common/test_parseractions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import argparse
1717

1818
from openstackclient.common import parseractions
19-
from tests import utils
19+
from openstackclient.tests import utils
2020

2121

2222
class TestKeyValueAction(utils.TestCase):

tests/compute/test_compute.py renamed to openstackclient/tests/compute/test_compute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from openstackclient.common import clientmanager
1919
from openstackclient.compute import client as compute_client
20-
from tests import utils
20+
from openstackclient.tests import utils
2121

2222

2323
AUTH_TOKEN = "foobar"
@@ -37,7 +37,7 @@ def setUp(self):
3737
api_version = {"compute": "2"}
3838

3939
compute_client.API_VERSIONS = {
40-
"2": "tests.compute.test_compute.FakeClient"
40+
"2": "openstackclient.tests.compute.test_compute.FakeClient"
4141
}
4242

4343
self.cm = clientmanager.ClientManager(token=AUTH_TOKEN,
File renamed without changes.

tests/identity/test_identity.py renamed to openstackclient/tests/identity/test_identity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from openstackclient.common import clientmanager
1717
from openstackclient.identity import client as identity_client
18-
from tests import utils
18+
from openstackclient.tests import utils
1919

2020

2121
AUTH_TOKEN = "foobar"
@@ -35,7 +35,7 @@ def setUp(self):
3535
api_version = {"identity": "2.0"}
3636

3737
identity_client.API_VERSIONS = {
38-
"2.0": "tests.identity.test_identity.FakeClient"
38+
"2.0": "openstackclient.tests.identity.test_identity.FakeClient"
3939
}
4040

4141
self.cm = clientmanager.ClientManager(token=AUTH_TOKEN,

0 commit comments

Comments
 (0)