From 8ee4503d7c318702ec7b737fe793417eea1b5857 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 25 Jul 2016 08:26:07 -0700 Subject: [PATCH] Exclude tests in dependencies in test dir from pytest (#2618) --- .gitignore | 4 ++-- setup.cfg | 1 + tests/common.py | 2 +- .../custom_components/device_tracker/test.py | 0 .../custom_components/light/test.py | 0 .../custom_components/switch/test.py | 0 6 files changed, 4 insertions(+), 3 deletions(-) rename tests/{config => testing_config}/custom_components/device_tracker/test.py (100%) rename tests/{config => testing_config}/custom_components/light/test.py (100%) rename tests/{config => testing_config}/custom_components/switch/test.py (100%) diff --git a/.gitignore b/.gitignore index 12f35dc5c3d..2edbd42b839 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ config/custom_components/* !config/custom_components/hello_world.py !config/custom_components/mqtt_example.py -tests/config/deps -tests/config/home-assistant.log +tests/testing_config/deps +tests/testing_config/home-assistant.log # Hide sublime text stuff *.sublime-project diff --git a/setup.cfg b/setup.cfg index 743c442be5e..b11dfac0c42 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ universal = 1 [pytest] testpaths = tests +norecursedirs = .git testing_config [flake8] exclude = .venv,.git,.tox,docs,www_static,venv,bin,lib,deps,build diff --git a/tests/common.py b/tests/common.py index 26d466bc4b8..4fd9da96ae3 100644 --- a/tests/common.py +++ b/tests/common.py @@ -18,7 +18,7 @@ _TEST_INSTANCE_PORT = SERVER_PORT def get_test_config_dir(): """Return a path to a test config dir.""" - return os.path.join(os.path.dirname(__file__), "config") + return os.path.join(os.path.dirname(__file__), "testing_config") def get_test_home_assistant(num_threads=None): diff --git a/tests/config/custom_components/device_tracker/test.py b/tests/testing_config/custom_components/device_tracker/test.py similarity index 100% rename from tests/config/custom_components/device_tracker/test.py rename to tests/testing_config/custom_components/device_tracker/test.py diff --git a/tests/config/custom_components/light/test.py b/tests/testing_config/custom_components/light/test.py similarity index 100% rename from tests/config/custom_components/light/test.py rename to tests/testing_config/custom_components/light/test.py diff --git a/tests/config/custom_components/switch/test.py b/tests/testing_config/custom_components/switch/test.py similarity index 100% rename from tests/config/custom_components/switch/test.py rename to tests/testing_config/custom_components/switch/test.py