Skip to content

Commit 6368c2f

Browse files
committed
Configure tox to automatically test and check the code in multiple python versions
1 parent 764570f commit 6368c2f

File tree

4 files changed

+213
-4
lines changed

4 files changed

+213
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__pycache__
1+
__pycache__
2+
.tox
3+
.coverage

poetry.lock

Lines changed: 187 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
[tool.poetry]
2-
name = "loading-api-wrapper"
2+
name = "python-loading-sdk"
33
version = "0.1.0"
44
description = "Python api wrapper for loading.se"
55
authors = ["hnrkcode <44243358+hnrkcode@users.noreply.github.com>"]
6+
packages = [
7+
{ include = "tests" },
8+
{ include = "tests/**/*.py" },
9+
]
610

711
[tool.poetry.dependencies]
812
python = "^3.8"
913
requests = "^2.28.1"
1014

1115
[tool.poetry.dev-dependencies]
16+
tox = "^3.25.1"
1217

1318
[build-system]
1419
requires = ["poetry-core>=1.0.0"]

tox.ini

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[tox]
2+
isolated_build = True
3+
envlist = py38,py39,py310
4+
5+
[testenv]
6+
deps =
7+
black
8+
coverage
9+
flake8
10+
mccabe
11+
pylint
12+
commands =
13+
black --check --diff --verbose loading_sdk
14+
flake8 loading_sdk --max-complexity 10 --ignore E501
15+
pylint loading_sdk --disable=C0114,C0115,C0116
16+
coverage run --source=loading_sdk --branch -m unittest -v
17+
coverage report -m --fail-under 80

0 commit comments

Comments
 (0)