Skip to content

Commit

Permalink
Tests require isort>=5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Aug 30, 2020
1 parent 58c43f3 commit 2a1bc12
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/continuous-integration-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ jobs:
$ErrorActionPreference='silentlycontinue'
# Install mock on Python 2.7
conda install mock --freeze-installed
# install black if available (Python 3.6 and above), and autopep8 for testing the pipe mode
# install black, isort if available (Python 3.6 and above), and autopep8 for testing the pipe mode
conda install black --freeze-installed
# install isort from source
pip install git+https://github.com/timothycrosley/isort.git
conda install isort>=5.3.0 --freeze-installed
conda install autopep8 --freeze-installed
# install sphinx_gallery and matplotlib if available
conda install sphinx-gallery --freeze-installed
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
# install black if available (Python 3.6 and above), and autopep8 for testing the pipe mode
# install black, isort if available (Python 3.6 and above), and autopep8 for testing the pipe mode
pip install black || true
pip install isort>=5.3.0 || true
pip install autopep8 || true
# install sphinx_gallery and matplotlib if available (may not work on pypy)
pip install sphinx_gallery || true
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ toml

# Python 2
pathlib

#isort>=5.3.0 #Python 3.6 and above
5 changes: 4 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def tool_version(tool):
not tool_version("jupytext"), reason="jupytext is not installed"
)
requires_black = pytest.mark.skipif(not tool_version("black"), reason="black not found")
requires_isort = pytest.mark.skipif(not tool_version("isort"), reason="isort not found")
requires_isort = pytest.mark.skipif(
not tool_version("isort") or tool_version("isort") <= "5.3.0",
reason="isort not found",
)
requires_flake8 = pytest.mark.skipif(
not tool_version("flake8"), reason="flake8 not found"
)
Expand Down

0 comments on commit 2a1bc12

Please sign in to comment.