Skip to content

Commit

Permalink
make tests work again
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Lerch <[email protected]>
  • Loading branch information
ryanlerch committed Apr 3, 2024
1 parent 7b325d7 commit dfb54e1
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,4 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
#intersphinx_mapping = {'http://docs.python.org/': None}
87 changes: 86 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ gevent = "^24.2.1"

[tool.poetry.group.dev.dependencies]
pytest = "^8.1.1"
pytest-cov = "^5.0.0"
coverage = "^7.4.4"

[tool.poetry.plugins."paste.app_factory"]
main = "tahrir:main"
Expand All @@ -73,7 +75,6 @@ source = [
]

[tool.coverage.report]
fail_under = 1
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
Expand Down
34 changes: 13 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
[tox]
envlist = py27,diff-cover,docs
# If the user is missing an interpreter, don't fail
skip_missing_interpreters = True
envlist = py3{9,10,11},docs
minversion = 3.9.0
isolated_build = true
skip_missing_interpreters = true

[testenv]
deps =
pytest
pytest-cov
git+https://github.com/fedora-infra/tahrir-api.git
commands =
py.test
passenv = HOME

[testenv:diff-cover]
deps =
diff-cover
skip_install = true
sitepackages = false
allowlist_externals =
poetry
commands_pre =
poetry install --all-extras
commands =
diff-cover coverage.xml --compare-branch=origin/develop --fail-under=100
poetry run pytest -v --cov=tahrir --cov-fail-under=1 --cov-report term-missing --cov-report html {posargs:tests/} -vv

[testenv:docs]
changedir = docs
deps =
sphinx
whitelist_externals =
mkdir
sphinx-build
commands=
mkdir -p _static
sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
poetry run mkdir -p _static
poetry run sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html

0 comments on commit dfb54e1

Please sign in to comment.