Skip to content

Commit

Permalink
Renamed test folder to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Mar 13, 2019
1 parent 5b36923 commit c429294
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ ratings:
- "**.py"
- "**.rb"
exclude_paths:
- test/**/*
- tests/**/*
- docs/**/*
6 changes: 3 additions & 3 deletions docs/topics/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ against a specific infrastructure, say aws, use a command like this:
Specific test cases
~~~~~~~~~~~~~~~~~~~~
You can run a specific test case, as follows:
``tox -- test/test_image_service.py:CloudImageServiceTestCase.test_create_and_list_imag``
``tox -- tests/test_image_service.py:CloudImageServiceTestCase.test_create_and_list_imag``

It can also be restricted to a particular environment as follows:
``tox -e "py27-aws" -- test/test_cloud_factory.py:CloudFactoryTestCase``
``tox -e "py27-aws" -- tests/test_cloud_factory.py:CloudFactoryTestCase``

See nosetest documentation for other parameters that can be passed in.

Expand All @@ -63,7 +63,7 @@ environment variable prior to running the tests, or they will default to
``CB_TEST_PROVIDER=aws``.

You can also run a specific test case, as follows:
``python setup.py test -s test.test_cloud_factory.CloudFactoryTestCase``
``python setup.py test -s tests.test_cloud_factory.CloudFactoryTestCase``

Using a mock provider
~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ logging-filter=cloudbridge
universal = 1

[flake8]
application_import_names = cloudbridge, test
application_import_names = cloudbridge, tests
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython'],
test_suite="test"
test_suite="tests"
)
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from cloudbridge.interfaces.resources import ResultList
from cloudbridge.providers.aws.services import AWSImageService

import test.helpers as helpers
import tests.helpers as helpers


def check_repr(test, obj):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from cloudbridge.interfaces.resources import Snapshot
from cloudbridge.interfaces.resources import Volume

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudBlockStoreServiceTestCase(ProviderTestBase):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_cloud_helpers.py → tests/test_cloud_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from cloudbridge.base.resources import ClientPagedResultList
from cloudbridge.base.resources import ServerPagedResultList

from test.helpers import ProviderTestBase
from tests.helpers import ProviderTestBase


class DummyResult(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from cloudbridge.interfaces.resources import SnapshotState
from cloudbridge.interfaces.resources import VMType

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudComputeServiceTestCase(ProviderTestBase):
Expand Down
6 changes: 3 additions & 3 deletions test/test_image_service.py → tests/test_image_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from cloudbridge.interfaces.resources import Instance
from cloudbridge.interfaces.resources import MachineImage

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudImageServiceTestCase(ProviderTestBase):
Expand Down
2 changes: 1 addition & 1 deletion test/test_interface.py → tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from cloudbridge.interfaces import TestMockHelperMixin
from cloudbridge.interfaces.exceptions import ProviderConnectionException

from test.helpers import ProviderTestBase
from tests.helpers import ProviderTestBase


class CloudInterfaceTestCase(ProviderTestBase):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from cloudbridge.interfaces.resources import Subnet
from cloudbridge.interfaces.resources import SubnetState

import test.helpers as helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
import tests.helpers as helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudNetworkServiceTestCase(ProviderTestBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from cloudbridge.interfaces import VolumeState
from cloudbridge.interfaces.exceptions import WaitStateException

from test import helpers
from test.helpers import ProviderTestBase
from tests import helpers
from tests.helpers import ProviderTestBase


class CloudObjectLifeCycleTestCase(ProviderTestBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
from cloudbridge.interfaces.resources import Bucket
from cloudbridge.interfaces.resources import BucketObject

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudObjectStoreServiceTestCase(ProviderTestBase):
Expand Down
6 changes: 3 additions & 3 deletions test/test_region_service.py → tests/test_region_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from cloudbridge.interfaces import Region

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudRegionServiceTestCase(ProviderTestBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from cloudbridge.interfaces.resources import VMFirewall
from cloudbridge.interfaces.resources import VMFirewallRule

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudSecurityServiceTestCase(ProviderTestBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import six

from test import helpers
from test.helpers import ProviderTestBase
from test.helpers import standard_interface_tests as sit
from tests import helpers
from tests.helpers import ProviderTestBase
from tests.helpers import standard_interface_tests as sit


class CloudVMTypeServiceTestCase(ProviderTestBase):
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
envlist = {py27,py36,pypy}-{aws,azure,gcp,openstack,mock}

[testenv]
commands = flake8 cloudbridge test setup.py
commands = flake8 cloudbridge tests setup.py
# see setup.cfg for options sent to nosetests and coverage
nosetests -v --nocapture --nologcapture --logging-format='%(asctime)s [%(levelname)s] %(name)s: %(message)s' {posargs}
setenv =
MOTO_AMIS_PATH=./test/fixtures/custom_amis.json
MOTO_AMIS_PATH=./tests/fixtures/custom_amis.json
# Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
BOTO_CONFIG=/dev/null
aws: CB_TEST_PROVIDER=aws
Expand Down

0 comments on commit c429294

Please sign in to comment.