Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-sphinx for
openSUSE:Factory checked in at 2022-04-25 23:35:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-sphinx (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-sphinx.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-sphinx"
Mon Apr 25 23:35:07 2022 rev:5 rq:972469 version:0.4.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-sphinx/python-pytest-sphinx.changes
2020-08-21 19:20:55.636940180 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-sphinx.new.1538/python-pytest-sphinx.changes
2022-04-25 23:35:10.878387369 +0200
@@ -1,0 +2,8 @@
+Mon Apr 25 06:23:43 UTC 2022 - Mark??ta Machov?? <[email protected]>
+
+- Update to 0.4.0
+ * Drop python2.7 (Fixes #14)
+ * Drop python3.5 and python3.6
+ * Require pytest>=7.0
+
+-------------------------------------------------------------------
Old:
----
pytest-sphinx-0.3.1.tar.gz
New:
----
pytest-sphinx-0.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-sphinx.spec ++++++
--- /var/tmp/diff_new_pack.1K1dAM/_old 2022-04-25 23:35:11.330388003 +0200
+++ /var/tmp/diff_new_pack.1K1dAM/_new 2022-04-25 23:35:11.330388003 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-sphinx
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +17,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without python2
+%define skip_python2 1
Name: python-pytest-sphinx
-Version: 0.3.1
+Version: 0.4.0
Release: 0
Summary: Doctest plugin for pytest with support for Sphinx-specific
doctest-directives
License: BSD-3-Clause
@@ -28,18 +28,11 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-pytest >= 3.1.1
+Requires: python-pytest >= 7.0.0
BuildArch: noarch
-%ifpython2
-Requires: python-enum34
-%endif
# SECTION test requirements
BuildRequires: %{python_module Sphinx}
-BuildRequires: %{python_module pytest >= 3.1.1}
-%if %{with python2}
-BuildRequires: python2-enum34
-BuildRequires: python2-mock
-%endif
+BuildRequires: %{python_module pytest >= 7.0.0}
# /SECTION
%python_subpackages
++++++ pytest-sphinx-0.3.1.tar.gz -> pytest-sphinx-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-sphinx-0.3.1/.github/workflows/pypi-upload.yml
new/pytest-sphinx-0.4.0/.github/workflows/pypi-upload.yml
--- old/pytest-sphinx-0.3.1/.github/workflows/pypi-upload.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-sphinx-0.4.0/.github/workflows/pypi-upload.yml 2022-03-30
22:29:23.000000000 +0200
@@ -0,0 +1,29 @@
+name: pypi_upload
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ name: PyPI Upload
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Python
+ uses: actions/setup-python@v3
+
+ - name: Install latest pip, build, twine
+ run: |
+ python -m pip install --upgrade --disable-pip-version-check pip
+ python -m pip install --upgrade build twine
+ - name: Build wheel and source distributions
+ run: |
+ python -m build
+ - name: Upload to PyPI via Twine
+ env:
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+ run: |
+ twine upload --verbose -u '__token__' dist/*
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/.github/workflows/test.yml
new/pytest-sphinx-0.4.0/.github/workflows/test.yml
--- old/pytest-sphinx-0.3.1/.github/workflows/test.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-sphinx-0.4.0/.github/workflows/test.yml 2022-03-30
22:29:23.000000000 +0200
@@ -0,0 +1,43 @@
+name: Test
+
+on:
+ push:
+ paths-ignore:
+ - "*.md"
+
+ pull_request:
+ paths-ignore:
+ - "*.md"
+
+jobs:
+ build:
+ # We want to run on external PRs, but not on our own internal PRs as
they'll be run
+ # by the push to the branch. Without this if check, checks are duplicated
since
+ # internal PRs match both the push and pull_request events.
+ if:
+ github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name !=
+ github.repository
+
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10"]
+ os: [ubuntu-latest, macOS-latest, windows-latest]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v3
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install --upgrade tox
+
+ - name: Unit tests
+ run: |
+ tox -e ci-py -- -v --color=yes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/.travis.yml
new/pytest-sphinx-0.4.0/.travis.yml
--- old/pytest-sphinx-0.3.1/.travis.yml 2020-08-05 23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-# Config file for automatic testing at travis-ci.org
-
-sudo: false
-language: python
-
-matrix:
- include:
- - python: 2.7
- env: TOX_ENV=py27
- - python: 3.5
- env: TOX_ENV=py35
- - python: 3.6
- env: TOX_ENV=py36
- - python: 3.7
- env: TOX_ENV=py37
- - python: 3.8
- env: TOX_ENV=py38
- - python: pypy
- env: TOX_ENV=pypy
- - python: 3.8
- env: TOX_ENV=flake8
-
-install:
- - pip install tox
-
-script:
- - tox -e $TOX_ENV
-
-before_cache:
- - rm -rf $HOME/.cache/pip/log
-
-cache:
- directories:
- - $HOME/.cache/pip
-
-deploy:
- provider: pypi
- username: thisch
- password:
- secure:
"dQbg17RbX8EtFj7+gc0iHiFQLlfMU7hKORMhXTOumvNOAEedNkb+30MR0mozD6Yv97SX7Lehhs9cPRHg45pzbySsctA20lOU8UkkBnjNyBYzVndNcODD4UlheV+FHXIL5JVk6ySkYkloD+UekPKWMUE6eIidV1v4wQFSbojYnpIjIOblkeSKu4EPotWU5VqMcKr1n5/9m48Tsmje8j+61G0+fym3jz9PkozDSF6c00HgtbwMEMZOCbfrUFQCpTezLTK0v3kMR9xBBojulBS9Dgh3qMNH/AACTkwwa2q9XTANV/bCJfBY41THYzqboQK3ByFNR/s3H6xZ9WgZahNFsKMFQNFAQgFPjxiaOQutxdwxP3Y4AwWmkubyHiEtTv/5Dyw8LuP1zrO3/+uT/XQnRUxBBFbkrUvJRhzlNKZ5p9MX+5MM/wYz4xyyKqFRqrBNujdLu+NvbzKNKx7CHKW0HVdbDmVKdw+Cf4CYTO5o/FMGhd08NYRmFU9ZcXQ+WD7SF+XXnPxRq9NA/VnxDQu97Nofo9NfbbyLh1bh6sv0X1sp44trkoQuOpco2u+85LdIJvJloYXUpJCcbKULUflMUbykZmwWX1NzmYwPvuIFsT2BuZpJDht+LknhuOE9JniWdTx3cQZ5SKZg/w1CvEsD0Xevl7fIAoAmNRaGIx9zFmU="
- on:
- tags: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/CHANGELOG.md
new/pytest-sphinx-0.4.0/CHANGELOG.md
--- old/pytest-sphinx-0.3.1/CHANGELOG.md 2020-08-05 23:32:11.000000000
+0200
+++ new/pytest-sphinx-0.4.0/CHANGELOG.md 2022-03-30 22:29:23.000000000
+0200
@@ -4,6 +4,15 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).
+## [Unreleased]
+###
+
+## [0.4.0] - 2022-03-30
+###
+ - Drop python2.7 (Fixes #14)
+ - Drop python3.5 and python3.6
+ - Require pytest>=7.0
+
## [0.3.1] - 2020-08-05
###
- Adapt to importmode API changes in pytest-6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/README.rst
new/pytest-sphinx-0.4.0/README.rst
--- old/pytest-sphinx-0.3.1/README.rst 2020-08-05 23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/README.rst 2022-03-30 22:29:23.000000000 +0200
@@ -2,22 +2,14 @@
pytest-sphinx
=============
-.. image:: https://travis-ci.org/thisch/pytest-sphinx.svg?branch=master
- :target: https://travis-ci.org/thisch/pytest-sphinx
- :alt: See Build Status on Travis CI
-
-.. image::
https://ci.appveyor.com/api/projects/status/github/thisch/pytest-sphinx?branch=master
- :target: https://ci.appveyor.com/project/thisch/pytest-sphinx/branch/master
- :alt: See Build Status on AppVeyor
+.. image:: https://github.com/thisch/pytest-sphinx/workflows/Test/badge.svg
+ :target: https://github.com/thisch/pytest-sphinx/actions
+ :alt: Action Status
A doctest plugin for pytest, which understands the sphinx-specific
directives from `doctest-sphinx`_. Those sphinx-specific directives can be
used in rst files as well as in docstrings of python modules.
-----
-
-This `Pytest`_ plugin was generated with `Cookiecutter`_ along with
`@hackebrot`_'s `Cookiecutter-pytest-plugin`_ template.
-
Features
--------
@@ -35,7 +27,6 @@
------------
* pytest
-* enum34 (for python2.7)
Installation
@@ -72,13 +63,11 @@
.. _`doctest-sphinx`: http://www.sphinx-doc.org/en/stable/ext/doctest.html
.. _`doctest-examples`:
https://github.com/sphinx-doc/sphinx/blob/master/tests/roots/test-ext-doctest/doctest.txt
-.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
-.. _`cookiecutter-pytest-plugin`:
https://github.com/pytest-dev/cookiecutter-pytest-plugin
.. _`file an issue`: https://github.com/thisch/pytest-sphinx/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/appveyor.yml
new/pytest-sphinx-0.4.0/appveyor.yml
--- old/pytest-sphinx-0.3.1/appveyor.yml 2020-08-05 23:32:11.000000000
+0200
+++ new/pytest-sphinx-0.4.0/appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,43 +0,0 @@
-# What Python version is installed where:
-# http://www.appveyor.com/docs/installed-software#python
-
-environment:
- matrix:
- - PYTHON: "C:\\Python27"
- TOX_ENV: "py27"
-
- - PYTHON: "C:\\Python35"
- TOX_ENV: "py35"
-
- - PYTHON: "C:\\Python36"
- TOX_ENV: "py36"
-
- - PYTHON: "C:\\Python37"
- TOX_ENV: "py37"
-
- - PYTHON: "C:\\Python38"
- TOX_ENV: "py38"
-
-init:
- - "%PYTHON%/python -V"
- - "%PYTHON%/python -c \"import struct;print( 8 * struct.calcsize(\'P\'))\""
-
-install:
- - "%PYTHON%/Scripts/easy_install -U pip"
- - "%PYTHON%/Scripts/pip install tox"
- - "%PYTHON%/Scripts/pip install wheel"
-
-build: false # Not a C# project, build stuff at the test step instead.
-
-test_script:
- - "%PYTHON%/Scripts/tox -e %TOX_ENV%"
-
-after_test:
- - "%PYTHON%/python setup.py bdist_wheel"
- - ps: "ls dist"
-
-artifacts:
- - path: dist\*
-
-#on_success:
-# - TODO: upload the content of dist/*.whl to a public wheelhouse
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/pytest_sphinx.py
new/pytest-sphinx-0.4.0/pytest_sphinx.py
--- old/pytest-sphinx-0.3.1/pytest_sphinx.py 2020-08-05 23:32:11.000000000
+0200
+++ new/pytest-sphinx-0.4.0/pytest_sphinx.py 2022-03-30 22:29:23.000000000
+0200
@@ -9,6 +9,7 @@
import doctest
import enum
+from pathlib import Path
import re
import sys
import textwrap
@@ -16,7 +17,10 @@
import _pytest.doctest
import pytest
+from _pytest.doctest import _is_mocked
+from _pytest.doctest import _patch_unwrap_mock_aware
from _pytest.doctest import DoctestItem
+from _pytest.pathlib import import_path
class SphinxDoctestDirectives(enum.Enum):
@@ -44,15 +48,9 @@
config = parent.config
if path.ext == ".py":
if config.option.doctestmodules:
- if hasattr(SphinxDoctestModule, "from_parent"):
- return SphinxDoctestModule.from_parent(parent, fspath=path)
- else:
- return SphinxDoctestModule(path, parent)
+ return SphinxDoctestModule.from_parent(parent,
path=Path(path.strpath))
elif _is_doctest(config, path, parent):
- if hasattr(SphinxDoctestTextfile, "from_parent"):
- return SphinxDoctestTextfile.from_parent(parent, fspath=path)
- else:
- return SphinxDoctestTextfile(path, parent)
+ return SphinxDoctestTextfile.from_parent(parent,
path=Path(path.strpath))
def _is_doctest(config, path, parent):
@@ -121,10 +119,7 @@
i += 1
elif _OPTION_DIRECTIVE_RE.match(stripped):
option_strings = (
- _OPTION_DIRECTIVE_RE.match(stripped)
- .group(1)
- .replace(",", " ")
- .split()
+ _OPTION_DIRECTIVE_RE.match(stripped).group(1).replace(",", "
").split()
)
for option in option_strings:
if (
@@ -175,13 +170,9 @@
body, skipif_expr, options = _split_into_body_and_options(content)
if skipif_expr and self.directive not in _DIRECTIVES_W_SKIPIF:
- raise ValueError(
- ":skipif: not allowed in {}".format(self.directive)
- )
+ raise ValueError(":skipif: not allowed in
{}".format(self.directive))
if options and self.directive not in _DIRECTIVES_W_OPTIONS:
- raise ValueError(
- ":options: not allowed in {}".format(self.directive)
- )
+ raise ValueError(":options: not allowed in
{}".format(self.directive))
self.body = body
self.skipif_expr = skipif_expr
self.options = options
@@ -213,12 +204,8 @@
match = _DIRECTIVE_RE.match(line)
if match:
- directive = getattr(
- SphinxDoctestDirectives, match.group(1).upper()
- )
- groups = [
- x.strip() for x in (match.group(2) or "default").split(",")
- ]
+ directive = getattr(SphinxDoctestDirectives,
match.group(1).upper())
+ groups = [x.strip() for x in (match.group(2) or
"default").split(",")]
indentation = _get_indentation(line)
# find the end of the block
j = i
@@ -229,10 +216,7 @@
except IndexError:
add_match(directive, i, j, groups)
break
- if (
- block_line.lstrip()
- and _get_indentation(block_line) <= indentation
- ):
+ if block_line.lstrip() and _get_indentation(block_line) <=
indentation:
add_match(directive, i, j, groups)
i = j - 1
break
@@ -271,33 +255,24 @@
for i, current_section in enumerate(sections):
# TODO support SphinxDoctestDirectives.TESTSETUP, ...
if current_section.directive == SphinxDoctestDirectives.TESTCODE:
- next_testoutput_sections = _get_next_textoutputsections(
- sections, i + 1
- )
+ next_testoutput_sections = _get_next_textoutputsections(sections,
i + 1)
section_data_seq = [
- get_testoutput_section_data(s)
- for s in next_testoutput_sections
+ get_testoutput_section_data(s) for s in
next_testoutput_sections
]
num_unskipped_sections = len([d for d in section_data_seq if d[0]])
if num_unskipped_sections > 1:
- raise ValueError(
- "There are multiple unskipped TESTOUTPUT sections"
- )
+ raise ValueError("There are multiple unskipped TESTOUTPUT
sections")
if num_unskipped_sections:
- want, options, _, exc_msg = next(
- d for d in section_data_seq if d[0]
- )
+ want, options, _, exc_msg = next(d for d in section_data_seq
if d[0])
else:
# no unskipped testoutput section
# do we really need doctest.Example to test
# independent TESTCODE sections?
want, options, exc_msg = "", {}, None
- if current_section.skipif_expr and eval(
- current_section.skipif_expr, globs
- ):
+ if current_section.skipif_expr and
eval(current_section.skipif_expr, globs):
# TODO add the doctest.Example to `examples` but mark it as
# skipped.
continue
@@ -354,8 +329,7 @@
# If REPORT_ONLY_FIRST_FAILURE is set, then suppress
# reporting after the first failure.
quiet = (
- self.optionflags & doctest.REPORT_ONLY_FIRST_FAILURE
- and failures > 0
+ self.optionflags & doctest.REPORT_ONLY_FIRST_FAILURE and
failures > 0
)
# Merge in the example's options.
@@ -442,9 +416,7 @@
failures += 1
elif outcome is BOOM:
if not quiet:
- self.report_unexpected_exception(
- out, test, example, exception
- )
+ self.report_unexpected_exception(out, test, example,
exception)
failures += 1
else:
assert False, ("unknown outcome", outcome)
@@ -500,30 +472,25 @@
)
if test.examples:
- if hasattr(DoctestItem, "from_parent"):
- yield DoctestItem.from_parent(
- parent=self, name=test.name, runner=runner, dtest=test
- )
- else:
- yield DoctestItem(test.name, self, runner, test)
+ yield DoctestItem.from_parent(
+ parent=self, name=test.name, runner=runner, dtest=test
+ )
class SphinxDoctestModule(pytest.Module):
def collect(self):
if self.fspath.basename == "conftest.py":
- try:
- module = self.config.pluginmanager._importconftest(
- self.fspath, importmode="prepend"
- )
- except TypeError:
- # pytest < 6.0
- module = self.config.pluginmanager._importconftest(self.fspath)
+ module = self.config.pluginmanager._importconftest(
+ self.path,
+ self.config.getoption("importmode"),
+ rootpath=self.config.rootpath,
+ )
else:
try:
- module = self.fspath.pyimport()
+ module = import_path(self.path, root=self.config.rootpath)
except ImportError:
if self.config.getvalue("doctest_ignore_import_errors"):
- pytest.skip("unable to import module %r" % self.fspath)
+ pytest.skip("unable to import module %r" % self.path)
else:
raise
optionflags = _pytest.doctest.get_optionflags(self)
@@ -538,9 +505,7 @@
fix taken from https://github.com/pytest-dev/pytest/pull/4212/
"""
- def _find(
- self, tests, obj, name, module, source_lines, globs, seen
- ):
+ def _find(self, tests, obj, name, module, source_lines, globs,
seen):
if _is_mocked(obj):
return
with _patch_unwrap_mock_aware():
@@ -555,13 +520,7 @@
seen,
)
- try:
- from _pytest.doctest import _is_mocked
- from _pytest.doctest import _patch_unwrap_mock_aware
- except ImportError:
- finder = doctest.DocTestFinder(parser=SphinxDocTestParser())
- else:
- finder = MockAwareDocTestFinder(parser=SphinxDocTestParser())
+ finder = MockAwareDocTestFinder(parser=SphinxDocTestParser())
runner = SphinxDocTestRunner(
verbose=0,
@@ -571,9 +530,6 @@
for test in finder.find(module, module.__name__):
if test.examples:
- if hasattr(DoctestItem, "from_parent"):
- yield DoctestItem.from_parent(
- parent=self, name=test.name, runner=runner, dtest=test
- )
- else:
- yield DoctestItem(test.name, self, runner, test)
+ yield DoctestItem.from_parent(
+ parent=self, name=test.name, runner=runner, dtest=test
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/setup.py
new/pytest-sphinx-0.4.0/setup.py
--- old/pytest-sphinx-0.3.1/setup.py 2020-08-05 23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/setup.py 2022-03-30 22:29:23.000000000 +0200
@@ -14,7 +14,7 @@
setup(
name="pytest-sphinx",
- version="0.3.1",
+ version="0.4.0",
author="Thomas Hisch",
author_email="[email protected]",
maintainer="Thomas Hisch",
@@ -27,22 +27,19 @@
),
long_description=read("README.rst"),
py_modules=["pytest_sphinx"],
- install_requires=['enum34;python_version<"3.4"', "pytest>=3.1.1"],
+ install_requires=["pytest>=7.0.0"],
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
- "Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/tests/test_python_files.py
new/pytest-sphinx-0.4.0/tests/test_python_files.py
--- old/pytest-sphinx-0.3.1/tests/test_python_files.py 2020-08-05
23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/tests/test_python_files.py 2022-03-30
22:29:23.000000000 +0200
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
import textwrap
-import six
-
def test_syntax_error_in_module_doctest(testdir):
@@ -226,12 +224,8 @@
\"\"\"
- {}
+ from unittest.mock import call
"""
- ).format(
- "from mock import call"
- if six.PY2
- else "from unittest.mock import call"
)
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/tests/test_sphinx_doctest.py
new/pytest-sphinx-0.4.0/tests/test_sphinx_doctest.py
--- old/pytest-sphinx-0.3.1/tests/test_sphinx_doctest.py 2020-08-05
23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/tests/test_sphinx_doctest.py 2022-03-30
22:29:23.000000000 +0200
@@ -2,17 +2,12 @@
import logging
import os
import subprocess
-import sys
import textwrap
import pytest
logger = logging.getLogger(__name__)
-pytestmark = pytest.mark.skipif(
- sys.version_info.major == 2, reason="problems with shinx in py2"
-)
-
class SphinxDoctestRunner:
def __init__(self, tmpdir):
@@ -121,9 +116,7 @@
plugin_result = testdir.runpytest("--doctest-glob=index.rst").stdout
plugin_result.fnmatch_lines(["*=== 1 passed in *"])
- @pytest.mark.parametrize(
- "testcode", ["raise RuntimeError", "pass", "print(1234)"]
- )
+ @pytest.mark.parametrize("testcode", ["raise RuntimeError", "pass",
"print(1234)"])
def test_skipif_true(self, testdir, sphinx_tester, testcode):
code = """
.. testcode::
@@ -222,9 +215,7 @@
assert "1 items passed all tests" in sphinx_output
plugin_output.fnmatch_lines(["*=== 1 passed in *"])
- @pytest.mark.parametrize(
- "testcode", ["raise RuntimeError", "pass", "print(1234)"]
- )
+ @pytest.mark.parametrize("testcode", ["raise RuntimeError", "pass",
"print(1234)"])
def test_skipif_true_in_testcode(self, testdir, sphinx_tester, testcode):
code = """
.. testcode::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/tests/test_text_files.py
new/pytest-sphinx-0.4.0/tests/test_text_files.py
--- old/pytest-sphinx-0.3.1/tests/test_text_files.py 2020-08-05
23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/tests/test_text_files.py 2022-03-30
22:29:23.000000000 +0200
@@ -1,6 +1,3 @@
-import platform
-import sys
-
import _pytest.doctest
import pytest_sphinx
@@ -93,13 +90,6 @@
def test_expected_exception_doctest(testdir):
- if platform.python_implementation() == "PyPy":
- exception_msg = "integer division by zero"
- elif sys.version_info.major < 3:
- exception_msg = "integer division or modulo by zero"
- else:
- exception_msg = "division by zero"
-
testdir.maketxtfile(
test_something="""
.. testcode::
@@ -110,10 +100,8 @@
Traceback (most recent call last):
...
- ZeroDivisionError: {}
- """.format(
- exception_msg
- )
+ ZeroDivisionError: division by zero
+ """
)
result = testdir.runpytest()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-sphinx-0.3.1/tox.ini
new/pytest-sphinx-0.4.0/tox.ini
--- old/pytest-sphinx-0.3.1/tox.ini 2020-08-05 23:32:11.000000000 +0200
+++ new/pytest-sphinx-0.4.0/tox.ini 2022-03-30 22:29:23.000000000 +0200
@@ -1,27 +1,9 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
-envlist = py27,py35,py36,py37,p38,pypy,flake8
+envlist = py37,py38,py39,py310,ci-py
[testenv]
deps =
pytest
sphinx
commands = pytest {posargs:tests}
-
-[testenv:py27]
-deps =
- enum34
- pytest
- mock
-
-[testenv:pypy]
-deps =
- enum34
- pytest
- mock
- sphinx
-
-[testenv:flake8]
-skip_install = true
-deps = flake8
-commands = flake8 pytest_sphinx.py setup.py tests