summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2020-08-23 00:09:37 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2020-08-23 00:09:37 -0700
commit180bdf9abc91223eb9d7b9e713ead7451095c5da (patch)
tree810a40912008a048765afe83964cfb5d50793781
parent19221a3e3c4e17e51056d1e70cd565b16f149cea (diff)
downloadisort-separate-integration-test.tar.gz
Start work to separate integration and unit testsseparate-integration-test
-rw-r--r--.isort.cfg2
-rwxr-xr-xscripts/test.sh2
-rw-r--r--setup.cfg2
-rw-r--r--tests/integration/test_high_profile_projects_using_isort (renamed from tests/test_integration.py)0
-rw-r--r--tests/integration/test_hypothesmith.py (renamed from tests/test_hypothesmith.py)0
-rw-r--r--tests/unit/__init__.py0
-rw-r--r--tests/unit/conftest.py (renamed from tests/conftest.py)2
-rw-r--r--tests/unit/example_crlf_file.py (renamed from tests/example_crlf_file.py)0
-rw-r--r--tests/unit/test_action_comments.py (renamed from tests/test_action_comments.py)0
-rw-r--r--tests/unit/test_api.py (renamed from tests/test_api.py)0
-rw-r--r--tests/unit/test_comments.py (renamed from tests/test_comments.py)0
-rw-r--r--tests/unit/test_deprecated_finders.py (renamed from tests/test_deprecated_finders.py)0
-rw-r--r--tests/unit/test_exceptions.py (renamed from tests/test_exceptions.py)0
-rw-r--r--tests/unit/test_format.py (renamed from tests/test_format.py)0
-rw-r--r--tests/unit/test_hooks.py (renamed from tests/test_hooks.py)0
-rw-r--r--tests/unit/test_importable.py (renamed from tests/test_importable.py)1
-rw-r--r--tests/unit/test_io.py (renamed from tests/test_io.py)0
-rw-r--r--tests/unit/test_isort.py (renamed from tests/test_isort.py)0
-rw-r--r--tests/unit/test_literal.py (renamed from tests/test_literal.py)0
-rw-r--r--tests/unit/test_main.py (renamed from tests/test_main.py)0
-rw-r--r--tests/unit/test_output.py (renamed from tests/test_output.py)0
-rw-r--r--tests/unit/test_parse.py (renamed from tests/test_parse.py)0
-rw-r--r--tests/unit/test_place.py (renamed from tests/test_place.py)0
-rw-r--r--tests/unit/test_pylama_isort.py (renamed from tests/test_pylama_isort.py)0
-rw-r--r--tests/unit/test_regressions.py (renamed from tests/test_regressions.py)0
-rw-r--r--tests/unit/test_settings.py (renamed from tests/test_settings.py)0
-rw-r--r--tests/unit/test_setuptools_command.py (renamed from tests/test_setuptools_command.py)0
-rw-r--r--tests/unit/test_ticketed_features.py (renamed from tests/test_ticketed_features.py)0
-rw-r--r--tests/unit/test_wrap.py (renamed from tests/test_wrap.py)0
-rw-r--r--tests/unit/test_wrap_modes.py (renamed from tests/test_wrap_modes.py)0
30 files changed, 5 insertions, 4 deletions
diff --git a/.isort.cfg b/.isort.cfg
index 3f3b28ad..567d1abd 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,4 +1,4 @@
[settings]
profile=hug
src_paths=isort,test
-skip=tests/example_crlf_file.py
+skip=tests/unit/example_crlf_file.py
diff --git a/scripts/test.sh b/scripts/test.sh
index a0659852..5aa1c764 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -2,5 +2,5 @@
set -euxo pipefail
./scripts/lint.sh
-poetry run pytest tests/ -s --cov=isort/ --cov-report=term-missing ${@-}
+poetry run pytest tests/unit/ -s --cov=isort/ --cov-report=term-missing ${@-}
poetry run coverage html
diff --git a/setup.cfg b/setup.cfg
index 770db0e1..8129063f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,4 +25,4 @@ exclude = _vendored
per-file-ignores =
isort/__init__.py:F401
isort/stdlibs/__init__.py:F401
- tests/example_crlf_file.py:F401
+ tests/unit/example_crlf_file.py:F401
diff --git a/tests/test_integration.py b/tests/integration/test_high_profile_projects_using_isort
index 9f10c221..9f10c221 100644
--- a/tests/test_integration.py
+++ b/tests/integration/test_high_profile_projects_using_isort
diff --git a/tests/test_hypothesmith.py b/tests/integration/test_hypothesmith.py
index 94964cee..94964cee 100644
--- a/tests/test_hypothesmith.py
+++ b/tests/integration/test_hypothesmith.py
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/unit/__init__.py
diff --git a/tests/conftest.py b/tests/unit/conftest.py
index 3b778a70..09e4acbd 100644
--- a/tests/conftest.py
+++ b/tests/unit/conftest.py
@@ -5,7 +5,7 @@ from pathlib import Path
import pytest
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
-SRC_DIR = os.path.abspath(os.path.join(TEST_DIR, "../isort/"))
+SRC_DIR = os.path.abspath(os.path.join(TEST_DIR, "../../isort/"))
@pytest.fixture
diff --git a/tests/example_crlf_file.py b/tests/unit/example_crlf_file.py
index 78db9518..78db9518 100644
--- a/tests/example_crlf_file.py
+++ b/tests/unit/example_crlf_file.py
diff --git a/tests/test_action_comments.py b/tests/unit/test_action_comments.py
index 508db0d2..508db0d2 100644
--- a/tests/test_action_comments.py
+++ b/tests/unit/test_action_comments.py
diff --git a/tests/test_api.py b/tests/unit/test_api.py
index 1b3ed370..1b3ed370 100644
--- a/tests/test_api.py
+++ b/tests/unit/test_api.py
diff --git a/tests/test_comments.py b/tests/unit/test_comments.py
index 4098f8ec..4098f8ec 100644
--- a/tests/test_comments.py
+++ b/tests/unit/test_comments.py
diff --git a/tests/test_deprecated_finders.py b/tests/unit/test_deprecated_finders.py
index bbd43596..bbd43596 100644
--- a/tests/test_deprecated_finders.py
+++ b/tests/unit/test_deprecated_finders.py
diff --git a/tests/test_exceptions.py b/tests/unit/test_exceptions.py
index 8a6f60fc..8a6f60fc 100644
--- a/tests/test_exceptions.py
+++ b/tests/unit/test_exceptions.py
diff --git a/tests/test_format.py b/tests/unit/test_format.py
index 3a8f7236..3a8f7236 100644
--- a/tests/test_format.py
+++ b/tests/unit/test_format.py
diff --git a/tests/test_hooks.py b/tests/unit/test_hooks.py
index 083fbfd4..083fbfd4 100644
--- a/tests/test_hooks.py
+++ b/tests/unit/test_hooks.py
diff --git a/tests/test_importable.py b/tests/unit/test_importable.py
index c48ce333..d45ca506 100644
--- a/tests/test_importable.py
+++ b/tests/unit/test_importable.py
@@ -4,6 +4,7 @@ import pytest
def test_importable():
"""Simple smoketest to ensure all isort modules are importable"""
+
import isort
import isort._future
import isort._future._dataclasses
diff --git a/tests/test_io.py b/tests/unit/test_io.py
index a4479c86..a4479c86 100644
--- a/tests/test_io.py
+++ b/tests/unit/test_io.py
diff --git a/tests/test_isort.py b/tests/unit/test_isort.py
index bcbc0f3a..bcbc0f3a 100644
--- a/tests/test_isort.py
+++ b/tests/unit/test_isort.py
diff --git a/tests/test_literal.py b/tests/unit/test_literal.py
index 0dd7458c..0dd7458c 100644
--- a/tests/test_literal.py
+++ b/tests/unit/test_literal.py
diff --git a/tests/test_main.py b/tests/unit/test_main.py
index 0d273871..0d273871 100644
--- a/tests/test_main.py
+++ b/tests/unit/test_main.py
diff --git a/tests/test_output.py b/tests/unit/test_output.py
index 2457f70d..2457f70d 100644
--- a/tests/test_output.py
+++ b/tests/unit/test_output.py
diff --git a/tests/test_parse.py b/tests/unit/test_parse.py
index 685ebcf7..685ebcf7 100644
--- a/tests/test_parse.py
+++ b/tests/unit/test_parse.py
diff --git a/tests/test_place.py b/tests/unit/test_place.py
index cc231d5f..cc231d5f 100644
--- a/tests/test_place.py
+++ b/tests/unit/test_place.py
diff --git a/tests/test_pylama_isort.py b/tests/unit/test_pylama_isort.py
index b7b78c13..b7b78c13 100644
--- a/tests/test_pylama_isort.py
+++ b/tests/unit/test_pylama_isort.py
diff --git a/tests/test_regressions.py b/tests/unit/test_regressions.py
index 4d5758c1..4d5758c1 100644
--- a/tests/test_regressions.py
+++ b/tests/unit/test_regressions.py
diff --git a/tests/test_settings.py b/tests/unit/test_settings.py
index fb231618..fb231618 100644
--- a/tests/test_settings.py
+++ b/tests/unit/test_settings.py
diff --git a/tests/test_setuptools_command.py b/tests/unit/test_setuptools_command.py
index c8da0d23..c8da0d23 100644
--- a/tests/test_setuptools_command.py
+++ b/tests/unit/test_setuptools_command.py
diff --git a/tests/test_ticketed_features.py b/tests/unit/test_ticketed_features.py
index 5828ec9d..5828ec9d 100644
--- a/tests/test_ticketed_features.py
+++ b/tests/unit/test_ticketed_features.py
diff --git a/tests/test_wrap.py b/tests/unit/test_wrap.py
index 2b8ec6fa..2b8ec6fa 100644
--- a/tests/test_wrap.py
+++ b/tests/unit/test_wrap.py
diff --git a/tests/test_wrap_modes.py b/tests/unit/test_wrap_modes.py
index d27f92e7..d27f92e7 100644
--- a/tests/test_wrap_modes.py
+++ b/tests/unit/test_wrap_modes.py