# HG changeset patch # User Georges Racinet <georges.racinet@octobus.net> # Date 1592429213 -7200 # Wed Jun 17 23:26:53 2020 +0200 # Node ID 6484beef902ced8a6da7037037877637f164530d # Parent 52f3af804ffece266f2479afc115e5e0cf88b7eb Running doctests, with new `run-all-tests` script A side benefit of `--doctest-modules` is that it will import all Python modules (looking for doctests in them), and by doing so, it will find missing `__init__.py` files and other inconsistent imports. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,8 @@ script: - pip3 freeze - flake8 --exclude stub hgitaly hgext3rd - - PYTHONPATH=/ci/repos/mercurial pytest --cov hgitaly --cov-config=.coveragerc -v + - PYTHONPATH=/ci/repos/mercurial ./run-all-tests + tests-hg-stable: stage: compat @@ -43,7 +44,7 @@ - /ci/repos/mercurial/hg version --debug - PYTHONPATH=/ci/repos/mercurial python3 -c "from mercurial import util; print(util.version())" - PYTHONPATH=/ci/repos/mercurial PATH=$HOME/.local/bin:$PATH - pytest --cov hgitaly --cov-config=.coveragerc -v + ./run-all-tests tests-hg-default: stage: compat @@ -60,4 +61,4 @@ - /ci/repos/mercurial/hg version --debug - PYTHONPATH=/ci/repos/mercurial python3 -c "from mercurial import util; print(util.version())" - PYTHONPATH=/ci/repos/mercurial PATH=$HOME/.local/bin:$PATH - pytest --cov hgitaly --cov-config=.coveragerc -v + ./run-all-tests diff --git a/run-all-tests b/run-all-tests new file mode 100755 --- /dev/null +++ b/run-all-tests @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ue + +pytest --doctest-modules --cov hgitaly --cov-config=.coveragerc -v $@ \ No newline at end of file