[Debian-astro-commits] [python-astropy] 01/01: Reimplement reportinfo() in doctestplus extension
Ole Streicher
olebole at moszumanska.debian.org
Sun Aug 13 13:42:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch master
in repository python-astropy.
commit 017698005b322ec50432e99e8672c7fe5501a092
Author: Ole Streicher <olebole at debian.org>
Date: Sun Aug 13 15:40:50 2017 +0200
Reimplement reportinfo() in doctestplus extension
Closes: #871995
---
...ement-reportinfo-in-doctestplus-extension.patch | 36 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 37 insertions(+)
diff --git a/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch b/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch
new file mode 100644
index 0000000..3daaf79
--- /dev/null
+++ b/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch
@@ -0,0 +1,36 @@
+From: Bruno Oliveira <nicoddemus at gmail.com>
+Date: Thu, 3 Aug 2017 18:56:37 -0300
+Subject: Reimplement reportinfo() in doctestplus extension
+
+In pytest 3.2.0 the member `dtest` is used in the `reportinfo()`
+function to report the location of the test examples in the doc,
+but the doctestplus extension does not pass one in the constructor.
+
+Ref: pytest-dev/pytest#2651
+---
+ astropy/tests/pytest_plugins.py | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/astropy/tests/pytest_plugins.py b/astropy/tests/pytest_plugins.py
+index e55c662..c3d999b 100644
+--- a/astropy/tests/pytest_plugins.py
++++ b/astropy/tests/pytest_plugins.py
+@@ -207,6 +207,18 @@ def pytest_configure(config):
+ extraglobs=dict(getfixture=fixture_request.getfuncargvalue),
+ raise_on_error=True, verbose=False, encoding='utf-8')
+
++ def reportinfo(self):
++ """
++ Overwrite pytest's ``DoctestItem`` because
++ ``DocTestTextfilePlus`` does not have a ``dtest`` attribute
++ which is used by pytest>=3.2.0 to return the location of the
++ tests.
++
++ For details see `pytest-dev/pytest#2651
++ <https://github.com/pytest-dev/pytest/pull/2651>`_.
++ """
++ return self.fspath, None, "[doctest] %s" % self.name
++
+ class DocTestParserPlus(doctest.DocTestParser):
+ """
+ An extension to the builtin DocTestParser that handles the
diff --git a/debian/patches/series b/debian/patches/series
index 0c44e4e..8c187ea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ only_python3-binaries.patch
Changing-parametrized-tests-pytest-3.2.0-compatible.patch
mark_known_failures.patch
external_python_pkgs.patch
+Reimplement-reportinfo-in-doctestplus-extension.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-astropy.git
More information about the Debian-astro-commits
mailing list