1
0

- Update to 0.5.0:

* No longer require Numpy. [#69]
  * Fixed a bug that caused __doctest_requires__ to not work correctly with submodules. [#73]
  * Fixed a limitation that meant that ELLIPSIS and FLOAT_CMP could not be used at the same time. [#75]
  * Fixed a bug that caused .. doctest-requires:: to not work correctly. [#78]
  * Fixed a FutureWarning related to split() with regular expressions. [#78]
  * Make it possible to specify versions in .. doctest-requires::. [#78]
  * Allow to use doctest-glob option instead of doctest-rst and text-file-format [#80]
  * Make comment character configurable via ini variable text_file_comment_chars [#80]
  * Respect ignore and ignore-glob options from pytest. [#82]
  * Add --doctest-only option. [#83]
  * Added an IGNORE_WARNINGS option for # doctest: [#84]
- Remove merged patch pr_37.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-doctestplus?expand=0&rev=13
This commit is contained in:
Tomáš Chvátal 2019-11-18 08:05:52 +00:00 committed by Git OBS Bridge
parent a7ab4bc288
commit 08a3bab4bb
5 changed files with 23 additions and 54 deletions

View File

@ -1,46 +0,0 @@
commit 898d66c7eeabddf5d17bb899c8beebe5aad2c4ee
Author: Oscar Benjamin <oscar.j.benjamin@gmail.com>
Date: Thu Jan 3 17:15:04 2019 +0000
Inline np.allclose to remove dependency on numpy
Index: pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py
===================================================================
--- pytest-doctestplus-0.4.0.orig/pytest_doctestplus/output_checker.py
+++ pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py
@@ -6,8 +6,7 @@ normalizations of Python expression outp
import doctest
import re
-
-import numpy as np
+import math
import six
from six.moves import zip
@@ -125,8 +124,10 @@ class OutputChecker(doctest.OutputChecke
else:
nw_.append(nw)
- if not np.allclose(float(ng), float(nw), rtol=self.rtol,
- atol=self.atol, equal_nan=True):
+ ng = float(ng)
+ nw = float(nw)
+ if not (abs(ng - nw) <= self.atol + self.rtol * abs(nw)
+ or (math.isnan(ng) and math.isnan(nw))):
return False
# replace all floats in the "got" string by those from "wanted".
Index: pytest-doctestplus-0.4.0/setup.py
===================================================================
--- pytest-doctestplus-0.4.0.orig/setup.py
+++ pytest-doctestplus-0.4.0/setup.py
@@ -40,7 +40,7 @@ setup(
'Topic :: Utilities',
],
keywords=['doctest', 'rst', 'pytest', 'py.test'],
- install_requires=['six', 'pytest>=3.0', 'numpy>=1.10'],
+ install_requires=['six', 'pytest>=3.0'],
python_requires='>=2.7',
entry_points={
'pytest11': [

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8872b9c236924af20c39c2813d7f1bde50a1edca7c4aba5a8bfbae3a32360e87
size 19783

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:41386187b9261cd59a3ffe4cf9df58d517288a1d3f11d96749b39b4e38b0a02c
size 26945

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Nov 18 08:01:54 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.5.0:
* No longer require Numpy. [#69]
* Fixed a bug that caused __doctest_requires__ to not work correctly with submodules. [#73]
* Fixed a limitation that meant that ELLIPSIS and FLOAT_CMP could not be used at the same time. [#75]
* Fixed a bug that caused .. doctest-requires:: to not work correctly. [#78]
* Fixed a FutureWarning related to split() with regular expressions. [#78]
* Make it possible to specify versions in .. doctest-requires::. [#78]
* Allow to use doctest-glob option instead of doctest-rst and text-file-format [#80]
* Make comment character configurable via ini variable text_file_comment_chars [#80]
* Respect ignore and ignore-glob options from pytest. [#82]
* Add --doctest-only option. [#83]
* Added an IGNORE_WARNINGS option for # doctest: [#84]
- Remove merged patch pr_37.patch
-------------------------------------------------------------------
Fri Sep 20 09:47:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pytest-doctestplus
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,15 +26,13 @@
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-doctestplus%{psuffix}
Version: 0.4.0
Version: 0.5.0
Release: 0
Summary: Pytest plugin with advanced doctest features
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/astropy/pytest-doctestplus
Source: https://files.pythonhosted.org/packages/source/p/pytest-doctestplus/pytest-doctestplus-%{version}.tar.gz
# Backport of https://github.com/astropy/pytest-doctestplus/pull/37
Patch0: pr_37.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -42,6 +40,7 @@ Requires: python-pytest >= 3.0
Requires: python-six
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 3.0}
BuildRequires: %{python_module pytest-doctestplus >= %{version}}
BuildRequires: %{python_module six}
@ -55,7 +54,6 @@ advanced doctest support and enables the testing of reStructuredText
%prep
%setup -q -n pytest-doctestplus-%{version}
%patch0 -p1
# do not change the pytest behaviour for us
rm -f setup.cfg