Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration: use tox to run unit tests and linting (#650)
- Loading branch information
1 parent
93de8af
commit 9b50f53
Showing
5 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ max-line-length = 88 | |
max-complexity = 18 | ||
select = B,C,E,F,W,T4,B9 | ||
exclude = | ||
./.tox/ | ||
./.venv/ | ||
./venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[testenv] | ||
deps = | ||
coverage >= 4.5.1 | ||
responses >= 0.21.0 | ||
unittest-parallel >= 1.5.0 | ||
commands = | ||
unittest-parallel -t . -s tests --coverage --coverage-rcfile .coveragerc | ||
|
||
# The system-provided libxml2 on MacOS is typically outdated and this can lead to lxml parsing issues | ||
# Using PyPi-provided binary wheels instead resolves this | ||
# We are affected by https://bugs.launchpad.net/lxml/+bug/1949271 in test_wild_mode when using system-provided libxml2 on MacOS | ||
platform = | ||
py-darwin: darwin | ||
install_command = | ||
py-darwin: python -m pip install --only-binary=lxml {opts} {packages} | ||
|
||
[testenv:lint] | ||
skip_install = true | ||
deps = | ||
black >= 22.3.0 | ||
flake8 >= 3.8.3 | ||
flake8-printf-formatting >= 1.1.0 | ||
mypy >= 0.971 | ||
types-beautifulsoup4 >= 4.11.6 | ||
types-requests >= 2.28.10 | ||
commands = | ||
black --check . | ||
flake8 --count . | ||
mypy recipe_scrapers tests |