Skip to content

Commit

Permalink
use pytest instead of nose, update configs in project files
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Arnold <sarnold@vctlabs.com>
  • Loading branch information
sarnold committed Mar 1, 2024
1 parent e500041 commit 88920e1
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [".",]
log_cli = false
doctest_optionflags = ["ELLIPSIS", "NORMALIZE_WHITESPACE",]
addopts = "-ra -q -p no:warnings --ignore=svg2rlg_render_test.py"

[tool.coverage.run]
branch = true
source = ["svg2rlg.py"]
plugins = ["coverage_python_version"]
omit = [
"svg2rlg_render_test.py",
"test_svg2rlg.py",
"setup.py",
".tox",
]
[tool.coverage.paths]
source = ["svg2rlg.py"]

[tool.coverage.report]
fail_under = 50
show_missing = true
ignore_errors = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"raise AssertionError",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
]

[tool.black]
line-length = 90
skip-string-normalization = true
include = '\.py$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| svg2rlg_render_test.py
)/
'''
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ with-coverage = 1
cover-package = svg2rlg
#cover-min-percentage = 90
doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE

17 changes: 10 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[tox]
envlist = py3{6,7,8,9}
envlist = py3{8,9,10,11}
skip_missing_interpreters = true
isolated_build = true
skipsdist = true

[gh-actions]
3.6 = py36
3.7 = py37
3.8 = py38
3.9 = py39
3.10 = py10
3.11 = py11

[testenv]
passenv =
Expand All @@ -26,12 +27,14 @@ passenv =
PIP_DOWNLOAD_CACHE

deps =
reportlab
nose
codecov
reportlab[pycairo]
wxPython
pytest
pytest-cov
coverage_python_version

commands =
nosetests -sx test_svg2rlg.py
python -m pytest -v . --capture=fd --doctest-modules --cov svg2rlg --cov-branch --cov-report term-missing

[testenv:deploy]
passenv = CI
Expand Down

0 comments on commit 88920e1

Please sign in to comment.