python-webtest/Install-pytest-cov.patch
chen-jan 9ab84c459f add python 3.9 & use pytest instead of nose
(cherry picked from commit 8997388ae3fcd2a32e566f09e12200fe309e6c68)
2022-05-05 16:11:43 +08:00

71 lines
1.7 KiB
Diff

From d3074969e1c9671564176dbf3a656b01f12b58b5 Mon Sep 17 00:00:00 2001
From: chen-jan <chen_aka_jan@163.com>
Date: Tue, 11 Jan 2022 14:36:00 +0800
Subject: [PATCH 2/2] Install pytest cov
---
docs/contributing.rst | 2 +-
setup.cfg | 12 ------------
setup.py | 2 +-
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 9d2a7bb..f2acbbb 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -23,7 +23,7 @@ Execute tests
.. code-block:: bash
- $ bin/nosetests
+ $ bin/pytest
Doctest: forms.rst ... ok
Doctest: index.rst ... ok
diff --git a/setup.cfg b/setup.cfg
index 448dae5..08ac3f5 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,18 +4,6 @@ dev = develop easy_install webtest[tests]
[bdist_wheel]
universal=1
-[nosetests]
-verbosity=2
-detailed-errors = True
-with-doctest = True
-doctest-extension = rst
-doctest-fixtures = _fixt
-# XXX: docs/index.rst requires lxml
-include = docs
-exclude = (CHANGELOG|changelog|contributing).rst
-cover-package=webtest
-doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE
-
[tool:pytest]
addopts = -p no:warnings
--doctest-modules
diff --git a/setup.py b/setup.py
index c2bd9d1..c532524 100644
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,7 @@ tests_require = [
'PasteDeploy',
'pyquery',
'pytest',
+ 'pytest-cov',
'WSGIProxy2',
]
@@ -62,7 +63,6 @@ setup(name='WebTest',
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
- test_suite='nose.collector',
tests_require=tests_require,
extras_require={
'tests': tests_require,
--
2.30.0