From 0d83eac6c18596bb66a0323c5e3d1db1d54d7d66 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Fri, 6 Apr 2018 14:16:30 +0200 Subject: [PATCH] moved tests outside package --- Makefile | 4 ++-- setup.cfg | 2 +- {ordr/tests => tests}/__init__.py | 0 {ordr/tests => tests}/_functional/__init__.py | 0 {ordr/tests => tests}/_functional/errors.py | 0 {ordr/tests => tests}/_functional/pages.py | 0 {ordr/tests => tests}/models/__init__.py | 0 {ordr/tests => tests}/models/account.py | 2 +- {ordr/tests => tests}/models/meta.py | 0 {ordr/tests => tests}/resources/__init__.py | 0 {ordr/tests => tests}/resources/root_resource.py | 0 {ordr/tests => tests}/security.py | 0 {ordr/tests => tests}/views/__init__.py | 0 {ordr/tests => tests}/views/errors.py | 0 {ordr/tests => tests}/views/pages.py | 0 15 files changed, 4 insertions(+), 4 deletions(-) rename {ordr/tests => tests}/__init__.py (100%) rename {ordr/tests => tests}/_functional/__init__.py (100%) rename {ordr/tests => tests}/_functional/errors.py (100%) rename {ordr/tests => tests}/_functional/pages.py (100%) rename {ordr/tests => tests}/models/__init__.py (100%) rename {ordr/tests => tests}/models/account.py (99%) rename {ordr/tests => tests}/models/meta.py (100%) rename {ordr/tests => tests}/resources/__init__.py (100%) rename {ordr/tests => tests}/resources/root_resource.py (100%) rename {ordr/tests => tests}/security.py (100%) rename {ordr/tests => tests}/views/__init__.py (100%) rename {ordr/tests => tests}/views/errors.py (100%) rename {ordr/tests => tests}/views/pages.py (100%) diff --git a/Makefile b/Makefile index eee7284..759e7f5 100644 --- a/Makefile +++ b/Makefile @@ -50,13 +50,13 @@ clean-test: ## remove test and coverage artifacts rm -fr htmlcov/ lint: ## check style with flake8 - flake8 ordr + flake8 ordr tests test: ## run tests quickly with the default Python, ignoring functional tests py.test coverage: ## check code coverage quickly with the default Python - coverage run --source ordr -m pytest --ignore ordr/tests/_functional/ + coverage run --source ordr -m pytest --ignore tests/_functional/ coverage report -m coverage html $(BROWSER) htmlcov/index.html diff --git a/setup.cfg b/setup.cfg index 9ba64ba..e598b63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ hang_closing = True test = pytest [tool:pytest] -testpaths = ordr +testpaths = tests python_files = *.py collect_ignore = ['setup.py'] diff --git a/ordr/tests/__init__.py b/tests/__init__.py similarity index 100% rename from ordr/tests/__init__.py rename to tests/__init__.py diff --git a/ordr/tests/_functional/__init__.py b/tests/_functional/__init__.py similarity index 100% rename from ordr/tests/_functional/__init__.py rename to tests/_functional/__init__.py diff --git a/ordr/tests/_functional/errors.py b/tests/_functional/errors.py similarity index 100% rename from ordr/tests/_functional/errors.py rename to tests/_functional/errors.py diff --git a/ordr/tests/_functional/pages.py b/tests/_functional/pages.py similarity index 100% rename from ordr/tests/_functional/pages.py rename to tests/_functional/pages.py diff --git a/ordr/tests/models/__init__.py b/tests/models/__init__.py similarity index 100% rename from ordr/tests/models/__init__.py rename to tests/models/__init__.py diff --git a/ordr/tests/models/account.py b/tests/models/account.py similarity index 99% rename from ordr/tests/models/account.py rename to tests/models/account.py index 1194d11..a57327c 100644 --- a/ordr/tests/models/account.py +++ b/tests/models/account.py @@ -3,7 +3,7 @@ import pytest from datetime import datetime, timedelta from pyramid.testing import DummyRequest -from ordr.tests import app_config # noqa: F401 +from .. import app_config # noqa: F401 @pytest.mark.parametrize( diff --git a/ordr/tests/models/meta.py b/tests/models/meta.py similarity index 100% rename from ordr/tests/models/meta.py rename to tests/models/meta.py diff --git a/ordr/tests/resources/__init__.py b/tests/resources/__init__.py similarity index 100% rename from ordr/tests/resources/__init__.py rename to tests/resources/__init__.py diff --git a/ordr/tests/resources/root_resource.py b/tests/resources/root_resource.py similarity index 100% rename from ordr/tests/resources/root_resource.py rename to tests/resources/root_resource.py diff --git a/ordr/tests/security.py b/tests/security.py similarity index 100% rename from ordr/tests/security.py rename to tests/security.py diff --git a/ordr/tests/views/__init__.py b/tests/views/__init__.py similarity index 100% rename from ordr/tests/views/__init__.py rename to tests/views/__init__.py diff --git a/ordr/tests/views/errors.py b/tests/views/errors.py similarity index 100% rename from ordr/tests/views/errors.py rename to tests/views/errors.py diff --git a/ordr/tests/views/pages.py b/tests/views/pages.py similarity index 100% rename from ordr/tests/views/pages.py rename to tests/views/pages.py