Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-describe for
openSUSE:Factory checked in at 2023-05-05 15:58:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-describe (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-describe.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-describe"
Fri May 5 15:58:24 2023 rev:4 rq:1084896 version:2.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-describe/python-pytest-describe.changes
2022-11-30 15:01:11.713784401 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-describe.new.1533/python-pytest-describe.changes
2023-05-05 15:58:47.444602697 +0200
@@ -1,0 +2,8 @@
+Thu May 4 22:38:28 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.1.0:
+ * This version comes with some internal clean-up and
+ modernization and now supports pytest 4.0 to 7.3 on Python
+ 3.7 to 3.11.
+
+-------------------------------------------------------------------
Old:
----
pytest-describe-2.0.1.tar.gz
New:
----
pytest-describe-2.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-describe.spec ++++++
--- /var/tmp/diff_new_pack.O1sCyW/_old 2023-05-05 15:58:49.460614247 +0200
+++ /var/tmp/diff_new_pack.O1sCyW/_new 2023-05-05 15:58:49.468614293 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-describe
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%define skip_python2 1
Name: python-pytest-describe
-Version: 2.0.1
+Version: 2.1.0
Release: 0
Summary: Describe-style plugin for pytest
License: MIT
++++++ pytest-describe-2.0.1.tar.gz -> pytest-describe-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/.github/workflows/main.yml
new/pytest-describe-2.1.0/.github/workflows/main.yml
--- old/pytest-describe-2.0.1/.github/workflows/main.yml 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/.github/workflows/main.yml 2023-04-10
00:52:22.000000000 +0200
@@ -5,7 +5,7 @@
branches:
- main
tags:
- - "*"
+ - '*'
pull_request:
branches:
@@ -17,50 +17,54 @@
strategy:
matrix:
- python: [3.6, 3.7, 3.8, 3.9, pypy3]
+ python: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.9']
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
- python -m pip install tox
-
- - name: Test with Python 3.6
- if: matrix.python == '3.6'
- run: tox -e "py36-pytest_{4,50,51,52,53,54,60,61,62,latest}"
+ python -m pip install 'tox>=4.4,<5'
- name: Test with Python 3.7
if: matrix.python == '3.7'
- run: tox -e "py37-pytest_{4,50,51,52,53,54,60,61,62,latest}"
+ run: tox run -x "tox.envlist=py37-pytest{4,5,60,61,62,70,71,72,73}"
- name: Test with Python 3.8
if: matrix.python == '3.8'
- run: tox -e "py38-pytest_{4,50,51,52,53,54,60,61,62,latest}"
+ run: tox run -x "tox.envlist=py38-pytest{4,5,60,61,62,70,71,72,73}"
- name: Test with Python 3.9
if: matrix.python == '3.9'
- run: tox -e "py39-pytest_{4,50,51,52,53,54,60,61,62,latest}"
+ run: tox run -x "tox.envlist=py39-pytest{4,5,60,61,62,70,71,72,73}"
- name: Test with Python 3.10
if: matrix.python == '3.10'
- run: tox -e "py310-pytest_{62,latest}"
+ run: tox run -x "tox.envlist=py310-pytest{62,70,71,72,73}"
- - name: Test with PyPy
- if: matrix.python == 'pypy3'
- run: tox -e "pypy-pytest_{4,50,51,52,53,54,60,61,62,latest}"
+ - name: Test with Python 3.11
+ if: matrix.python == '3.11'
+ run: tox run -x "tox.envlist=spy311-pytest{73}"
+
+ - name: Test with PyPy 3.9
+ if: matrix.python == 'pypy3.9'
+ run: tox run -x "tox.envlist=pypy39-pytest{4,5,60,61,62,70,71,72,73}"
- name: Linting with Flake8
- if: matrix.python == '3.9'
- run: tox -e flake8
+ if: matrix.python == '3.10'
+ run: tox run -e flake8
+
+ - name: Ensure full coverage
+ if: matrix.python == '3.10'
+ run: tox run -e coverage
deploy:
if: |
@@ -70,13 +74,13 @@
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- - uses: actions/setup-python@v2
+ - uses: actions/setup-python@v4
with:
- python-version: "3.9"
+ python-version: '3.10'
- name: Install dependencies
run: |
@@ -87,7 +91,7 @@
run: python setup.py sdist bdist_wheel
- name: Publish package
- uses: pypa/[email protected]
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/MANIFEST.in
new/pytest-describe-2.1.0/MANIFEST.in
--- old/pytest-describe-2.0.1/MANIFEST.in 2021-11-13 21:10:01.000000000
+0100
+++ new/pytest-describe-2.1.0/MANIFEST.in 2023-04-10 00:52:22.000000000
+0200
@@ -1,5 +1,6 @@
include README.rst
include LICENSE
include setup.py
+include setup.cfg
include tox.ini
include test/*.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/PKG-INFO
new/pytest-describe-2.1.0/PKG-INFO
--- old/pytest-describe-2.0.1/PKG-INFO 2021-11-13 21:10:06.757585000 +0100
+++ new/pytest-describe-2.1.0/PKG-INFO 2023-04-10 00:52:26.287712800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-describe
-Version: 2.0.1
+Version: 2.1.0
Summary: Describe-style plugin for pytest
Home-page: https://github.com/pytest-dev/pytest-describe
Author: Robin Pedersen
@@ -8,27 +8,31 @@
Maintainer: Christoph Zwerschke
Maintainer-email: [email protected]
License: MIT
+Project-URL: Source, https://github.com/pytest-dev/pytest-describe
+Project-URL: Tracker, https://github.com/pytest-dev/pytest-describe/issues
+Keywords: test,unittest,plugin,describe
Platform: unix
Platform: linux
Platform: osx
Platform: cygwin
Platform: win32
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: POSIX
-Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
-Classifier: Topic :: Software Development :: Testing
-Classifier: Topic :: Software Development :: Libraries
-Classifier: Topic :: Utilities
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Testing
+Classifier: Topic :: Utilities
+Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE
@@ -173,5 +177,3 @@
over fixtures defined in the shared behavior. This rule only applies to
fixtures, not to other functions (nested describe blocks and tests). Instead,
they are all collected as separate tests.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/pytest_describe/__init__.py
new/pytest-describe-2.1.0/pytest_describe/__init__.py
--- old/pytest-describe-2.0.1/pytest_describe/__init__.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe/__init__.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,6 +1,5 @@
from .shared import behaves_like
+__all__ = ['behaves_like']
-__all__ = [
- behaves_like,
-]
+__version__ = '2.1.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/pytest_describe/plugin.py
new/pytest-describe-2.1.0/pytest_describe/plugin.py
--- old/pytest-describe-2.0.1/pytest_describe/plugin.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe/plugin.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,3 +1,5 @@
+"""The pytest-describe plugin"""
+
import sys
import types
import pytest
@@ -7,44 +9,47 @@
PYTEST_GTE_5_4 = PYTEST_GTE_7_0 or hasattr(pytest.Collector, 'from_parent')
-def trace_function(funcobj, *args, **kwargs):
- """Call a function, and return its locals"""
- funclocals = {}
+def trace_function(func, *args, **kwargs): # pragma: no-cover
+ """Call a function and return its locals."""
+ f_locals = {}
- def _tracefunc(frame, event, arg):
+ def _trace_func(frame, event, arg): # pragma: no cover
# Activate local trace for first call only
- if frame.f_back.f_locals.get('_tracefunc') == _tracefunc:
- if event == 'return':
- funclocals.update(frame.f_locals)
+ if (frame.f_back.f_locals.get('_trace_func') == _trace_func
+ and event == 'return'):
+ f_locals.update(frame.f_locals)
- sys.setprofile(_tracefunc)
+ sys.setprofile(_trace_func)
try:
- funcobj(*args, **kwargs)
+ func(*args, **kwargs)
finally:
sys.setprofile(None)
- return funclocals
+ return f_locals
-def make_module_from_function(funcobj):
- """Evaluates the local scope of a function, as if it was a module"""
- module = types.ModuleType(funcobj.__name__)
+def make_module_from_function(func):
+ """Evaluate the local scope of a function as if it was a module."""
+ module = types.ModuleType(func.__name__)
# Import shared behaviors into the generated module. We do this before
# importing the direct children, so that fixtures in the block that's
# importing the behavior take precedence.
- for shared_funcobj in getattr(funcobj, '_behaves_like', []):
- module.__dict__.update(evaluate_shared_behavior(shared_funcobj))
+ for shared_func in getattr(func, '_behaves_like', []):
+ module.__dict__.update(evaluate_shared_behavior(shared_func))
# Import children
- module.__dict__.update(trace_function(funcobj))
+ module.__dict__.update(trace_function(func))
return module
-def evaluate_shared_behavior(funcobj):
- if not hasattr(funcobj, '_shared_functions'):
- funcobj._shared_functions = {}
- for name, obj in trace_function(funcobj).items():
+def evaluate_shared_behavior(func):
+ """Evaluate the local scope of a function."""
+ try:
+ shared_functions = func._shared_functions
+ except AttributeError:
+ shared_functions = {}
+ for name, obj in trace_function(func).items():
# Only functions are relevant here
if not isinstance(obj, types.FunctionType):
continue
@@ -53,10 +58,11 @@
# want fixtures to be overridden in the block that's importing the
# behavior.
if not hasattr(obj, '_pytestfixturefunction'):
- name = obj._mangled_name = f"{funcobj.__name__}::{name}"
+ name = obj._mangled_name = f"{func.__name__}::{name}"
- funcobj._shared_functions[name] = obj
- return funcobj._shared_functions
+ shared_functions[name] = obj
+ func._shared_functions = shared_functions
+ return shared_functions
class DescribeBlock(pytest.Module):
@@ -70,10 +76,10 @@
if PYTEST_GTE_7_0:
self = super().from_parent(
parent=parent, path=parent.path, nodeid=nodeid)
- elif PYTEST_GTE_5_4:
+ elif PYTEST_GTE_5_4: # pragma: no cover
self = super().from_parent(
parent=parent, fspath=parent.fspath, nodeid=nodeid)
- else:
+ else: # pragma: no cover
self = cls(parent=parent, fspath=parent.fspath, nodeid=nodeid)
self.name = name
self.funcobj = obj
@@ -110,6 +116,7 @@
def pytest_pycollect_makeitem(collector, name, obj):
+ """Collector items from describe blocks."""
if isinstance(obj, types.FunctionType):
for prefix in collector.config.getini('describe_prefixes'):
if obj.__name__.startswith(prefix):
@@ -117,5 +124,6 @@
def pytest_addoption(parser):
+ """Add configuration option describe_prefixes."""
parser.addini("describe_prefixes", type="args", default=("describe",),
help="prefixes for Python describe function discovery")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/pytest_describe/shared.py
new/pytest-describe-2.1.0/pytest_describe/shared.py
--- old/pytest-describe-2.0.1/pytest_describe/shared.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe/shared.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,7 +1,16 @@
+"""Support for shared behaviors"""
+
+__all__ = ["behaves_like"]
+
+
def behaves_like(*behavior_funcs):
+ """Decorator for shared behaviors."""
+
def decorator(func):
- if not hasattr(func, '_behaves_like'):
- func._behaves_like = []
- func._behaves_like += behavior_funcs
+ try:
+ func._behaves_like.extend(behavior_funcs)
+ except AttributeError:
+ func._behaves_like = behavior_funcs[:]
return func
+
return decorator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-describe-2.0.1/pytest_describe.egg-info/PKG-INFO
new/pytest-describe-2.1.0/pytest_describe.egg-info/PKG-INFO
--- old/pytest-describe-2.0.1/pytest_describe.egg-info/PKG-INFO 2021-11-13
21:10:06.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe.egg-info/PKG-INFO 2023-04-10
00:52:26.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-describe
-Version: 2.0.1
+Version: 2.1.0
Summary: Describe-style plugin for pytest
Home-page: https://github.com/pytest-dev/pytest-describe
Author: Robin Pedersen
@@ -8,27 +8,31 @@
Maintainer: Christoph Zwerschke
Maintainer-email: [email protected]
License: MIT
+Project-URL: Source, https://github.com/pytest-dev/pytest-describe
+Project-URL: Tracker, https://github.com/pytest-dev/pytest-describe/issues
+Keywords: test,unittest,plugin,describe
Platform: unix
Platform: linux
Platform: osx
Platform: cygwin
Platform: win32
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: POSIX
-Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
-Classifier: Topic :: Software Development :: Testing
-Classifier: Topic :: Software Development :: Libraries
-Classifier: Topic :: Utilities
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Software Development :: Testing
+Classifier: Topic :: Utilities
+Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE
@@ -173,5 +177,3 @@
over fixtures defined in the shared behavior. This rule only applies to
fixtures, not to other functions (nested describe blocks and tests). Instead,
they are all collected as separate tests.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-describe-2.0.1/pytest_describe.egg-info/SOURCES.txt
new/pytest-describe-2.1.0/pytest_describe.egg-info/SOURCES.txt
--- old/pytest-describe-2.0.1/pytest_describe.egg-info/SOURCES.txt
2021-11-13 21:10:06.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe.egg-info/SOURCES.txt
2023-04-10 00:52:26.000000000 +0200
@@ -2,6 +2,7 @@
LICENSE
MANIFEST.in
README.rst
+setup.cfg
setup.py
tox.ini
.github/workflows/main.yml
@@ -14,11 +15,12 @@
pytest_describe.egg-info/entry_points.txt
pytest_describe.egg-info/requires.txt
pytest_describe.egg-info/top_level.txt
+test/conftest.py
+test/test_class.py
test/test_collect.py
-test/test_custom_prefix.py
test/test_fixtures.py
test/test_marks.py
test/test_output.py
+test/test_prefix.py
test/test_shared.py
-test/test_simple_execution.py
-test/util.py
\ No newline at end of file
+test/test_simple.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-describe-2.0.1/pytest_describe.egg-info/entry_points.txt
new/pytest-describe-2.1.0/pytest_describe.egg-info/entry_points.txt
--- old/pytest-describe-2.0.1/pytest_describe.egg-info/entry_points.txt
2021-11-13 21:10:06.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe.egg-info/entry_points.txt
2023-04-10 00:52:26.000000000 +0200
@@ -1,3 +1,2 @@
[pytest11]
pytest-describe = pytest_describe.plugin
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-describe-2.0.1/pytest_describe.egg-info/requires.txt
new/pytest-describe-2.1.0/pytest_describe.egg-info/requires.txt
--- old/pytest-describe-2.0.1/pytest_describe.egg-info/requires.txt
2021-11-13 21:10:06.000000000 +0100
+++ new/pytest-describe-2.1.0/pytest_describe.egg-info/requires.txt
2023-04-10 00:52:26.000000000 +0200
@@ -1 +1 @@
-pytest>=4.0.0
+pytest<8,>=4.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/setup.cfg
new/pytest-describe-2.1.0/setup.cfg
--- old/pytest-describe-2.0.1/setup.cfg 2021-11-13 21:10:06.757585000 +0100
+++ new/pytest-describe-2.1.0/setup.cfg 2023-04-10 00:52:26.287712800 +0200
@@ -1,3 +1,50 @@
+[metadata]
+name = pytest-describe
+version = attr: pytest_describe.__version__
+description = Describe-style plugin for pytest
+long_description = file: README.rst
+long_description_content_type = text/x-rst
+url = https://github.com/pytest-dev/pytest-describe
+author = Robin Pedersen
+author_email = [email protected]
+maintainer = Christoph Zwerschke
+maintainer_email = [email protected]
+license = MIT
+license_files = LICENSE
+platforms = unix, linux, osx, cygwin, win32
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Operating System :: MacOS :: MacOS X
+ Operating System :: Microsoft :: Windows
+ Operating System :: POSIX
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
+ Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
+ Topic :: Software Development :: Libraries
+ Topic :: Software Development :: Testing
+ Topic :: Utilities
+keywords = test, unittest, plugin, describe
+project_urls =
+ Source=https://github.com/pytest-dev/pytest-describe
+ Tracker=https://github.com/pytest-dev/pytest-describe/issues
+
+[options]
+python_requires = >=3.7
+packages =
+ pytest_describe
+install_requires =
+ pytest>=4.6,<8
+
+[options.entry_points]
+pytest11 =
+ pytest-describe = pytest_describe.plugin
+
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/setup.py
new/pytest-describe-2.1.0/setup.py
--- old/pytest-describe-2.0.1/setup.py 2021-11-13 21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/setup.py 2023-04-10 00:52:22.000000000 +0200
@@ -1,49 +1,4 @@
from setuptools import setup
-
-with open("README.rst") as readme_file:
- readme = readme_file.read()
-
-
-setup(
- name='pytest-describe',
- version='2.0.1',
- description='Describe-style plugin for pytest',
- long_description=readme,
- long_description_content_type='text/x-rst',
- url='https://github.com/pytest-dev/pytest-describe',
- author='Robin Pedersen',
- author_email='[email protected]',
- maintainer='Christoph Zwerschke',
- maintainer_email='[email protected]',
- license='MIT',
- license_file='LICENSE',
- platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
- install_requires=[
- 'pytest>=4.0.0',
- ],
- entry_points={
- 'pytest11': [
- 'pytest-describe = pytest_describe.plugin',
- ],
- },
- packages=['pytest_describe'],
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: POSIX',
- 'Operating System :: Microsoft :: Windows',
- 'Operating System :: MacOS :: MacOS X',
- 'Topic :: Software Development :: Testing',
- 'Topic :: Software Development :: Libraries',
- 'Topic :: Utilities',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3 :: Only',
- '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',
- ],
-)
+if __name__ == "__main__":
+ setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/conftest.py
new/pytest-describe-2.1.0/test/conftest.py
--- old/pytest-describe-2.0.1/test/conftest.py 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-describe-2.1.0/test/conftest.py 2023-04-10 00:52:22.000000000
+0200
@@ -0,0 +1,3 @@
+"""Global fixtures for testing the plugin"""
+
+pytest_plugins = ["pytester"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_class.py
new/pytest-describe-2.1.0/test/test_class.py
--- old/pytest-describe-2.0.1/test/test_class.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_class.py 2023-04-10
00:52:22.000000000 +0200
@@ -0,0 +1,16 @@
+"""Test that classes are ignored"""
+
+
+def test_skip_classes(testdir):
+ testdir.makepyfile(
+ """
+ def describe_something():
+ def fn():
+ assert True
+ class cls:
+ def __call__(self):
+ assert True
+ """)
+
+ result = testdir.runpytest()
+ result.assert_outcomes(passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_collect.py
new/pytest-describe-2.1.0/test/test_collect.py
--- old/pytest-describe-2.0.1/test/test_collect.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_collect.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,14 +1,9 @@
-import py
-import re
+"""Test collection of test functions"""
-from util import assert_outcomes
-pytest_plugins = 'pytester'
-
-
-def test_collect(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+def test_collect_only(testdir):
+ testdir.makepyfile(
+ """
def describe_something():
def is_foo():
pass
@@ -24,27 +19,28 @@
pass
def test_something():
pass
- """))
+ """)
result = testdir.runpytest('--collectonly')
+ result.assert_outcomes()
- expected_regex = map(re.compile, [
- r"collected 4 item(s)?",
- r"\s*<DescribeBlock '?describe_something'?>",
- r"\s*<Function '?is_foo'?>",
- r"\s*<Function '?can_bar'?>",
- r"\s*<DescribeBlock '?describe_something_else'?>",
- r"\s*<DescribeBlock '?describe_nested'?>",
- r"\s*<Function '?a_test'?>",
- r"\s*<Function '?test_something'?>",
- ])
- for line in expected_regex:
- assert any([line.match(r) is not None for r in result.outlines])
+ output = '\n'.join(filter(None, result.outlines))
+ assert """
+collected 4 items
+<Module test_collect_only.py>
+ <DescribeBlock 'describe_something'>
+ <Function is_foo>
+ <Function can_bar>
+ <DescribeBlock 'describe_something_else'>
+ <DescribeBlock 'describe_nested'>
+ <Function a_test>
+ <Function test_something>
+""" in output
def test_describe_evaluated_once(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
count = 0
def describe_is_evaluated_only_once():
global count
@@ -56,7 +52,7 @@
def describe_nested():
def three():
assert count == 1
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, passed=3)
+ result.assert_outcomes(passed=3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_custom_prefix.py
new/pytest-describe-2.1.0/test/test_custom_prefix.py
--- old/pytest-describe-2.0.1/test/test_custom_prefix.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_custom_prefix.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-import py
-import re
-
-pytest_plugins = 'pytester'
-
-ini = """
-[pytest]
-describe_prefixes = foo bar
-"""
-
-
-def test_collect_custom_prefix(testdir):
- testdir.makeini(ini)
-
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
- def foo_scope():
- def bar_context():
- def passes():
- pass
- """))
-
- result = testdir.runpytest('--collectonly')
- expected_lines = map(re.compile, [
- r"collected 1 item(s)?",
- r"\s*<Module '?(a_dir/)?test_a.py'?>",
- r"\s*<DescribeBlock '?foo_scope'?>",
- r"\s*<DescribeBlock '?bar_context'?>",
- r"\s*<Function '?passes'?>",
- ])
- for line in expected_lines:
- assert any([line.match(r) is not None for r in result.outlines])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_fixtures.py
new/pytest-describe-2.1.0/test/test_fixtures.py
--- old/pytest-describe-2.0.1/test/test_fixtures.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_fixtures.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,12 +1,9 @@
-import py
-from util import assert_outcomes
-
-pytest_plugins = 'pytester'
+"""Test with fixtures"""
def test_can_access_local_fixture(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_something():
@@ -16,15 +13,15 @@
def thing_is_42(thing):
assert thing == 42
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=1)
+ result.assert_outcomes(passed=1)
def test_can_access_fixture_from_nested_scope(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_something():
@@ -35,15 +32,15 @@
def describe_a_nested_scope():
def thing_is_42(thing):
assert thing == 42
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=1)
+ result.assert_outcomes(passed=1)
def test_local_fixture_overrides(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.fixture
@@ -61,7 +58,7 @@
def thing_is_12(thing):
assert thing == 12
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=2)
+ result.assert_outcomes(passed=2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_marks.py
new/pytest-describe-2.1.0/test/test_marks.py
--- old/pytest-describe-2.0.1/test/test_marks.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_marks.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,12 +1,18 @@
-import py
-from util import assert_outcomes
+"""Test mark decorator"""
-pytest_plugins = 'pytester'
+
+def assert_outcomes(result, **kwargs):
+ """Get all relevant outcomes"""
+ assert {
+ key: value
+ for key, value in result.parseoutcomes().items()
+ if key != 'seconds'
+ } == kwargs # pragma: no cover
def test_special_marks(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_marks():
@@ -25,15 +31,15 @@
@pytest.mark.parametrize('foo', (1, 2, 3))
def isint(foo):
assert foo == int(foo)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=3, xfailed=1, xpassed=1, skipped=1)
+ result.assert_outcomes(passed=3, xfailed=1, xpassed=1, skipped=1)
def test_multiple_variables_parametrize(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_marks():
@@ -51,15 +57,15 @@
def isint_tuple_names(foo, bar):
assert foo == int(foo)
assert bar == int(bar)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=6)
+ result.assert_outcomes(passed=6)
def test_cartesian_parametrize(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_marks():
@@ -69,15 +75,15 @@
def isint(foo, bar):
assert foo == int(foo)
assert bar == int(bar)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=9)
+ result.assert_outcomes(passed=9)
def test_parametrize_applies_to_describe(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -94,15 +100,15 @@
def describe_nested():
def isint3(foo):
assert foo == int(foo)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=15)
+ result.assert_outcomes(passed=15)
def test_cartesian_parametrize_on_describe(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -112,15 +118,15 @@
def isint(foo, bar):
assert foo == int(foo)
assert bar == int(bar)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=9)
+ result.assert_outcomes(passed=9)
def test_parametrize_with_shared(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
from pytest import fixture
from pytest_describe import behaves_like
@@ -143,15 +149,15 @@
@fixture
def sound(foo):
return foo
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=6)
+ result.assert_outcomes(passed=6)
def test_parametrize_with_shared_but_different_values(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
from pytest import fixture
from pytest_describe import behaves_like
@@ -176,15 +182,15 @@
@fixture
def sound(foo):
return ('bark', foo)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=6)
+ result.assert_outcomes(passed=6)
def test_coincident_parametrize_at_top(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -199,32 +205,41 @@
def describe_marks2():
def isint2(foo):
assert foo == int(foo)
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=12)
+ result.assert_outcomes(passed=12)
def test_keywords(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_a():
- @pytest.mark.foo
def foo_test():
pass
- @pytest.mark.bar
def bar_test():
pass
- """))
+ """)
result = testdir.runpytest('-k', 'foo')
- assert_outcomes(result, passed=1, deselected=1)
-
+ try:
+ result.assert_outcomes(passed=1, deselected=1)
+ except TypeError: # pragma: no cover pytest < 7.0
+ assert_outcomes(result, passed=1, deselected=1)
+
+
+def test_custom_markers(testdir):
+ testdir.makeini(
+ """
+ [pytest]
+ markers =
+ foo
+ bar
+ """)
-def test_marks(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
def describe_a():
@pytest.mark.foo
@@ -233,15 +248,18 @@
@pytest.mark.bar
def bar_test():
pass
- """))
+ """)
result = testdir.runpytest('-m', 'foo')
- assert_outcomes(result, passed=1, deselected=1)
+ try:
+ result.assert_outcomes(passed=1, deselected=1)
+ except TypeError: # pragma: no cover pytest < 7.0
+ assert_outcomes(result, passed=1, deselected=1)
def test_module_marks(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
pytestmark = [ pytest.mark.foo ]
def describe_a():
@@ -249,15 +267,15 @@
def describe_b():
def a_test():
pass
- """))
+ """)
result = testdir.runpytest('-m', 'foo')
- assert_outcomes(result, passed=1)
+ result.assert_outcomes(passed=1)
def test_mark_at_describe_function(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.mark.foo
def describe_foo():
@@ -267,15 +285,15 @@
@pytest.mark.bar
def b_test():
pass
- """))
+ """)
result = testdir.runpytest('-m', 'foo')
- assert_outcomes(result, passed=2)
+ result.assert_outcomes(passed=2)
def test_mark_stacking(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
import pytest
@pytest.fixture()
def get_marks(request):
@@ -294,7 +312,7 @@
('baz', 'all_marks_are_chained'),
('bar', 'all_marks_are_chained'),
('foo', 'describe_marks')]
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, passed=2)
+ result.assert_outcomes(passed=2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_output.py
new/pytest-describe-2.1.0/test/test_output.py
--- old/pytest-describe-2.0.1/test/test_output.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_output.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,11 +1,9 @@
-import py
-
-pytest_plugins = 'pytester'
+"""Test verbose output"""
def test_verbose_output(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
def describe_something():
def describe_nested_ok():
def passes():
@@ -13,14 +11,20 @@
def describe_nested_bad():
def fails():
assert False
- """))
+ """
+ )
+
+ result = testdir.runpytest("-v")
+
+ result.assert_outcomes(passed=1, failed=1)
+
+ output = [
+ ' '.join(line.split('::', 2)[2].split())
+ for line in result.outlines
+ if line.startswith('test_verbose_output.py::describe_something::')
+ ]
- result = testdir.runpytest('-v')
- expected = [
- 'a_dir/test_a.py::describe_something::describe_nested_bad::'
- 'fails FAILED',
- 'a_dir/test_a.py::describe_something::describe_nested_ok::'
- 'passes PASSED',
+ assert output == [
+ "describe_nested_ok::passes PASSED [ 50%]",
+ "describe_nested_bad::fails FAILED [100%]",
]
- for line in expected:
- assert any(out for out in result.outlines if out.startswith(line))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_prefix.py
new/pytest-describe-2.1.0/test/test_prefix.py
--- old/pytest-describe-2.0.1/test/test_prefix.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_prefix.py 2023-04-10
00:52:22.000000000 +0200
@@ -0,0 +1,29 @@
+"""Test custom prefixes"""
+
+
+def test_collect_custom_prefix(testdir):
+ testdir.makeini(
+ """
+ [pytest]
+ describe_prefixes = foo bar
+ """)
+
+ testdir.makepyfile(
+ """
+ def foo_scope():
+ def bar_context():
+ def passes():
+ pass
+ """)
+
+ result = testdir.runpytest('--collectonly')
+ result.assert_outcomes()
+
+ output = '\n'.join(filter(None, result.outlines))
+ assert """
+collected 1 item
+<Module test_collect_custom_prefix.py>
+ <DescribeBlock 'foo_scope'>
+ <DescribeBlock 'bar_context'>
+ <Function passes>
+""" in output
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_shared.py
new/pytest-describe-2.1.0/test/test_shared.py
--- old/pytest-describe-2.0.1/test/test_shared.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_shared.py 2023-04-10
00:52:22.000000000 +0200
@@ -1,12 +1,9 @@
-import py
-from util import assert_outcomes
+"""Test shared behaviors"""
-pytest_plugins = 'pytester'
-
-def test_shared_behavior(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+def test_shared_behaviors(testdir):
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -25,15 +22,15 @@
@fixture
def sound():
return "bark"
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, failed=1, passed=1)
+ result.assert_outcomes(failed=1, passed=1)
def test_multiple_shared_behaviors(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -61,15 +58,15 @@
@fixture
def sound():
return "bark"
- """))
+ """)
result = testdir.runpytest()
- assert_outcomes(result, failed=1, passed=3)
+ result.assert_outcomes(failed=1, passed=3)
def test_fixture(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -84,15 +81,15 @@
@behaves_like(a_duck)
def describe_a_normal_duck():
pass
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, passed=1)
+ result.assert_outcomes(passed=1)
def test_override_fixture(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -109,15 +106,15 @@
@fixture
def sound():
return "bark"
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, failed=1)
+ result.assert_outcomes(failed=1)
def test_name_mangling(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -131,15 +128,15 @@
foo = 4242
def it_does_something():
assert foo == 4242
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, passed=2)
+ result.assert_outcomes(passed=2)
def test_nested_name_mangling(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -160,15 +157,15 @@
def describe_thing():
def it_does_something():
pass
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, passed=5)
+ result.assert_outcomes(passed=5)
def test_evaluated_once(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_something.py').write(py.code.Source("""
+ testdir.makepyfile(
+ """
from pytest import fixture
from pytest_describe import behaves_like
@@ -185,7 +182,7 @@
@behaves_like(thing)
def describe_something_else():
pass
- """))
+ """)
result = testdir.runpytest('-v')
- assert_outcomes(result, passed=2)
+ result.assert_outcomes(passed=2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_simple.py
new/pytest-describe-2.1.0/test/test_simple.py
--- old/pytest-describe-2.0.1/test/test_simple.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_simple.py 2023-04-10
00:52:22.000000000 +0200
@@ -0,0 +1,47 @@
+"""Test simple execution"""
+
+
+def test_can_pass(testdir):
+ testdir.makepyfile(
+ """
+ def describe_something():
+ def passes():
+ assert True
+ def describe_nested():
+ def passes_too():
+ assert True
+ """)
+
+ result = testdir.runpytest()
+ result.assert_outcomes(passed=2)
+
+
+def test_can_fail(testdir):
+ testdir.makepyfile(
+ """
+ def describe_something():
+ def fails():
+ assert False
+ def describe_nested():
+ def fails_too():
+ assert False
+ """)
+
+ result = testdir.runpytest()
+ result.assert_outcomes(failed=2)
+
+
+def test_can_fail_and_pass(testdir):
+ testdir.makepyfile(
+ """
+ def describe_something():
+ def describe_nested_ok():
+ def passes():
+ assert True
+ def describe_nested_bad():
+ def fails():
+ assert False
+ """)
+
+ result = testdir.runpytest()
+ result.assert_outcomes(passed=1, failed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/test_simple_execution.py
new/pytest-describe-2.1.0/test/test_simple_execution.py
--- old/pytest-describe-2.0.1/test/test_simple_execution.py 2021-11-13
21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/test/test_simple_execution.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-import py
-from util import assert_outcomes
-
-pytest_plugins = 'pytester'
-
-
-def test_can_pass(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
- def describe_something():
- def passes():
- assert True
- def describe_nested():
- def passes_too():
- assert True
- """))
-
- result = testdir.runpytest()
- assert_outcomes(result, passed=2)
-
-
-def test_can_fail(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
- def describe_something():
- def fails():
- assert False
- def describe_nested():
- def fails_too():
- assert False
- """))
-
- result = testdir.runpytest()
- assert_outcomes(result, failed=2)
-
-
-def test_can_fail_and_pass(testdir):
- a_dir = testdir.mkpydir('a_dir')
- a_dir.join('test_a.py').write(py.code.Source("""
- def describe_something():
- def describe_nested_ok():
- def passes():
- assert True
- def describe_nested_bad():
- def fails():
- assert False
- """))
-
- result = testdir.runpytest()
- assert_outcomes(result, passed=1, failed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/test/util.py
new/pytest-describe-2.1.0/test/util.py
--- old/pytest-describe-2.0.1/test/util.py 2021-11-13 21:10:01.000000000
+0100
+++ new/pytest-describe-2.1.0/test/util.py 1970-01-01 01:00:00.000000000
+0100
@@ -1,8 +0,0 @@
-def assert_outcomes(result, **expected):
- outcomes = result.parseoutcomes()
-
- for key in 'seconds', 'warning', 'warnings':
- if key in outcomes:
- del outcomes[key]
-
- assert outcomes == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-describe-2.0.1/tox.ini
new/pytest-describe-2.1.0/tox.ini
--- old/pytest-describe-2.0.1/tox.ini 2021-11-13 21:10:01.000000000 +0100
+++ new/pytest-describe-2.1.0/tox.ini 2023-04-10 00:52:22.000000000 +0200
@@ -1,42 +1,42 @@
[tox]
-envlist =
py{36,37,38,39,py}-pytest_{4,50,51,52,53,54,60,61,62,latest,main},py{310}-pytest_{62,latest,main},flake8
+envlist =
py{37,38,39,py39}-pytest{4,5,60,61,62,70,71,72,73},py310-pytest{62,70,71,72,73},py311-pytest{73,-latest},flake8,coverage
[testenv]
basepython =
- py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
- pypy: pypy3
+ py311: python3.11
+ pypy39: pypy3.9
deps =
- pytest_4: pytest>=4.6,<5.0
- pytest_50: pytest>=5.0,<5.2
- pytest_51: pytest>=5.1,<5.2
- pytest_52: pytest>=5.2,<5.3
- pytest_53: pytest>=5.3,<5.4
- pytest_54: pytest>=5.4,<5.5
- pytest_60: pytest>=6.0,<6.1
- pytest_61: pytest>=6.1,<6.2
- pytest_62: pytest>=6.2,<6.3
- pytest_latest: pytest
- pytest_main: git+https://github.com/pytest-dev/pytest.git@main
-commands = pytest -rw {posargs}
+ pytest4: pytest>=4.6,<5.0
+ pytest5: pytest>=5.4,<5.5
+ pytest60: pytest>=6.0,<6.1
+ pytest61: pytest>=6.1,<6.2
+ pytest62: pytest>=6.2,<6.3
+ pytest70: pytest>=7.0,<7.1
+ pytest71: pytest>=7.1,<7.2
+ pytest72: pytest>=7.2,<7.3
+ pytest73: pytest>=7.3,<7.4
+ pytest-latest: pytest
+ pytest-main: git+https://github.com/pytest-dev/pytest.git@main
+commands = pytest test {posargs}
[testenv:flake8]
-basepython = python3.9
-deps = flake8>=4,<5
+basepython = python3.10
+deps = flake8>=6,<7
commands =
flake8 pytest_describe test setup.py
[testenv:coverage]
-basepython = python3.9
+basepython = python3.10
deps =
coverage
pytest
commands =
- coverage run --source=pytest_describe -m pytest
- coverage report -m
+ coverage run --source=pytest_describe,test -m pytest test {posargs}
+ coverage report -m --fail-under=100
[pytest]
minversion = 4.6