From bcde9d10880a1cde619845ca1f31e1abc99d94bb Mon Sep 17 00:00:00 2001 From: staticdev Date: Sun, 11 Dec 2022 16:26:07 +0100 Subject: [PATCH] Fix unit tests --- .github/workflows/test.yml | 5 ++--- poetry.lock | 18 +++++++++++++++++- pyproject.toml | 1 + scripts/test.sh | 1 - 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b0bc0b83..2501a6811 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,9 +58,8 @@ jobs: - name: Test shell: bash - run: | - poetry run pytest tests/unit/ -s --cov=isort/ --cov-report=term-missing ${@-} - poetry run coverage xml + run: ./scripts/test.sh + - name: Report Coverage if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' uses: codecov/codecov-action@v1 diff --git a/poetry.lock b/poetry.lock index 246fc6d33..0911b9fe6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -298,6 +298,18 @@ toml = "*" conda = ["pyyaml"] pipenv = ["pipenv"] +[[package]] +name = "example-isort-formatting-plugin" +version = "0.0.4" +description = "An example plugin that modifies isort formatting using black." +category = "dev" +optional = false +python-versions = ">=3.6.2,<4.0" + +[package.dependencies] +black = ">20.08b1" +isort = ">=5.1.4,<6.0.0" + [[package]] name = "example-isort-sorting-plugin" version = "0.0.3" @@ -1844,7 +1856,7 @@ requirements-deprecated-finder = ["pipreqs", "pip-api"] [metadata] lock-version = "1.1" python-versions = ">=3.6.2,<4.0" -content-hash = "c4513c1489dd2877f13e8c0f47ddb2d721e367a02cab07d8e6ce5c522e44323b" +content-hash = "e780d5eab8f17b64d7791e87db75586d1d5c9bbb51aba1a2aea68a7ce2a393e6" [metadata.files] appdirs = [ @@ -1995,6 +2007,10 @@ dparse = [ {file = "dparse-0.6.2-py3-none-any.whl", hash = "sha256:8097076f1dd26c377f30d4745e6ec18fef42f3bf493933b842ac5bafad8c345f"}, {file = "dparse-0.6.2.tar.gz", hash = "sha256:d45255bda21f998bc7ddf2afd5e62505ba6134756ba2d42a84c56b0826614dfe"}, ] +example-isort-formatting-plugin = [ + {file = "example_isort_formatting_plugin-0.0.4-py3-none-any.whl", hash = "sha256:a1e4afc0a359495060e5fcc14a9c6f3bc7c8fe7e096fb0b878195c8e3bf4e2c6"}, + {file = "example_isort_formatting_plugin-0.0.4.tar.gz", hash = "sha256:8085996afbc81e729a258861181144038fd8a65a39113d3632b430e6ff20b974"}, +] example-isort-sorting-plugin = [ {file = "example_isort_sorting_plugin-0.0.3-py3-none-any.whl", hash = "sha256:643c348a97d537bce87ffd027083463c56ee47b61d68158ad0b5ec848c93d24b"}, {file = "example_isort_sorting_plugin-0.0.3.tar.gz", hash = "sha256:1cb716db8abfbe067f85848e6b6e24cdc8b5d6def18b055039e7c2dbc3e57948"}, diff --git a/pyproject.toml b/pyproject.toml index 78f75cc54..a32edc22a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,7 @@ smmap2 = "^3.0.1" gitdb2 = "^4.0.2" httpx = "^0.13.3" example_shared_isort_profile = "^0.0.1" +example_isort_formatting_plugin = "^0.0.4" example_isort_sorting_plugin = "^0.0.3" flake8 = "^3.8.4" hypothesis = "^6.10.1" diff --git a/scripts/test.sh b/scripts/test.sh index d76d8cce4..888650e3d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,6 +1,5 @@ #!/bin/bash set -euxo pipefail -./scripts/lint.sh poetry run pytest tests/unit/ -s --cov=isort/ --cov-report=term-missing ${@-} --ignore=tests/unit/test_deprecated_finders.py poetry run coverage html