summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--.testr.conf4
-rw-r--r--.travis.yml7
-rw-r--r--MANIFEST.in2
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini10
6 files changed, 20 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index febd0f7..8fab157 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,14 @@
*.pyc
build/
dist/
+htmlcov/
MANIFEST
.*.swp
*.egg-info
.idea/
+coverage.xml
docs/_build
-.testrepository/
+.coverage
.tox
+.venv/
venv/
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 44644a6..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./gitlab/tests $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/.travis.yml b/.travis.yml
index a86780e..2935557 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -83,5 +83,12 @@ jobs:
script:
- pip3 install tox
- tox -e py38
+ - stage: test
+ dist: bionic
+ name: coverage
+ python: 3.8
+ script:
+ - pip3 install tox
+ - tox -e cover
allow_failures:
- env: GITLAB_TAG=nightly
diff --git a/MANIFEST.in b/MANIFEST.in
index 2d1b15b..df53d66 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,5 @@
include COPYING AUTHORS ChangeLog.rst RELEASE_NOTES.rst requirements.txt test-requirements.txt rtd-requirements.txt
-include tox.ini .testr.conf .travis.yml
+include tox.ini .travis.yml
recursive-include tools *
recursive-include docs *j2 *.py *.rst api/*.rst Makefile make.bat
recursive-include gitlab/tests/data *
diff --git a/test-requirements.txt b/test-requirements.txt
index 65d09d7..c788436 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,9 +1,9 @@
coverage
-discover
-testrepository
hacking>=0.9.2,<0.10
httmock
jinja2
mock
+pytest
+pytest-cov
sphinx>=1.3
sphinx_rtd_theme
diff --git a/tox.ini b/tox.ini
index 92d227d..f721ebc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,7 +13,7 @@ install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
- python setup.py testr --testr-args='{posargs}'
+ pytest gitlab/tests {posargs}
[testenv:pep8]
commands =
@@ -40,9 +40,11 @@ commands = python setup.py build_sphinx
[testenv:cover]
commands =
- python setup.py testr --slowest --coverage --testr-args="{posargs}"
- coverage report --omit=*tests*
- coverage html --omit=*tests*
+ pytest --cov gitlab --cov-report term --cov-report html \
+ --cov-report xml gitlab/tests {posargs}
+
+[coverage:run]
+omit = *tests*
[testenv:cli_func_v4]
commands = {toxinidir}/tools/functional_tests.sh -a 4