From 46c01677e9fe688646bd5fffe01ed9300458a043185d8155c73d7661a418b73b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 24 Jul 2023 18:49:04 +0000 Subject: [PATCH] - update to 2.2.0: * pseudo traceback additions `-l` or `--showlocals` shows locals `__tracebackhide__ = True` is honored. * Fix 127 IndexError when running a check in a thread * include tests an examples in sdist - pr 121 * README.md - clean up documentation for `--check-max-tb`. * Minor internal cleanup - removed some debug code. * `check.call_on_fail(func)` - ***Experimental*** * Name changed from `check.set_failure_callback(func)`. * This "func" function will be called for each failed check, and needs to accept a string parameter. * With the following change, the default is now pretty darn fast, and most people will not need to modify any settings to get most of the speed improvements. * `--check-max-tb=` - sets the max number of pseudo- traceback reports per test function. * `check.set_no_tb` and `--set-no-tb` will be removed in a future release. (probably soon) * Since `--check-max-tb` is more useful, the default for `--check-max-tb` is 1, which is already pretty fast. * And `--check-max-tb=0` has the same effect as `--check-no- tb`. * Most changes are related to speedup improvements. * use `--check-no-tb --check-max-report=10` to get super zippy. * `check.between()` added just for fun * Rewrote `check.equal()` and other helper functions to not use assert. * `--check-no-tb` - turn off tracebacks * `--check-max-report` - limit reported failures per test OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-check?expand=0&rev=4 --- pytest_check-1.0.5.tar.gz | 3 --- pytest_check-2.2.0.tar.gz | 3 +++ python-pytest-check.changes | 46 +++++++++++++++++++++++++++++++++++++ python-pytest-check.spec | 14 +++++------ 4 files changed, 55 insertions(+), 11 deletions(-) delete mode 100644 pytest_check-1.0.5.tar.gz create mode 100644 pytest_check-2.2.0.tar.gz diff --git a/pytest_check-1.0.5.tar.gz b/pytest_check-1.0.5.tar.gz deleted file mode 100644 index 8eb2be2..0000000 --- a/pytest_check-1.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9c8db6b1dee3c1e66162bd079b81c083296cb7131e9841519c28a40818a4875 -size 12829 diff --git a/pytest_check-2.2.0.tar.gz b/pytest_check-2.2.0.tar.gz new file mode 100644 index 0000000..b16d9dd --- /dev/null +++ b/pytest_check-2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec93701d930de5a628957cd54fe918e324da1b811040e64cb70cae2857cf26ff +size 26282 diff --git a/python-pytest-check.changes b/python-pytest-check.changes index bcaf07c..e091b7f 100644 --- a/python-pytest-check.changes +++ b/python-pytest-check.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Mon Jul 24 18:46:08 UTC 2023 - Dirk Müller + +- update to 2.2.0: + * pseudo traceback additions + `-l` or `--showlocals` shows locals + `__tracebackhide__ = True` is honored. + * Fix 127 IndexError when running a check in a thread + * include tests an examples in sdist - pr 121 + * README.md - clean up documentation for `--check-max-tb`. + * Minor internal cleanup - removed some debug code. + * `check.call_on_fail(func)` - ***Experimental*** + * Name changed from `check.set_failure_callback(func)`. + * This "func" function will be called for each failed check, + and needs to accept a string parameter. + * With the following change, the default is now pretty darn + fast, and most people will not need to modify any settings to + get most of the speed improvements. + * `--check-max-tb=` - sets the max number of pseudo- + traceback reports per test function. + * `check.set_no_tb` and `--set-no-tb` will be removed in a + future release. (probably soon) + * Since `--check-max-tb` is more useful, the default for + `--check-max-tb` is 1, which is already pretty fast. + * And `--check-max-tb=0` has the same effect as `--check-no- + tb`. + * Most changes are related to speedup improvements. + * use `--check-no-tb --check-max-report=10` to get super zippy. + * `check.between()` added just for fun + * Rewrote `check.equal()` and other helper functions to not use + assert. + * `--check-no-tb` - turn off tracebacks + * `--check-max-report` - limit reported failures per test + function + * `--check-max-fail` - limit failures per test function + * `check.set_no_tb()` - turn off tracebacks for one test + function + * `check.set_max_report()` - limit reports for one test + function + * `check.set_max_fail()` - limit failures for one test function + * `check.between(b, a, c)` - check that a < b < c + * Add `any_failures()`. + * While using the `check` fixture, allow `check.check` as a + context manager. this is unnecessary, the `check` fixture + now works as a context manager. + ------------------------------------------------------------------- Thu Jul 14 17:07:11 UTC 2022 - Ben Greiner diff --git a/python-pytest-check.spec b/python-pytest-check.spec index e1e0376..6ffed05 100644 --- a/python-pytest-check.spec +++ b/python-pytest-check.spec @@ -1,7 +1,7 @@ # -# spec file for package python-pytest_check +# spec file for package python-pytest-check # -# 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 @@ -16,21 +16,20 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 +%{?sle15_python_module_pythons} Name: python-pytest-check -Version: 1.0.5 +Version: 2.2.0 Release: 0 Summary: A pytest plugin that allows multiple failures per test License: MIT URL: https://github.com/okken/pytest-check Source: https://files.pythonhosted.org/packages/source/p/pytest-check/pytest_check-%{version}.tar.gz -BuildRequires: python-rpm-macros BuildRequires: %{python_module base >= 3.6} -BuildRequires: %{python_module pip} BuildRequires: %{python_module flit-core >= 2} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 6} BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-pytest >= 6 BuildArch: noarch %python_subpackages @@ -38,7 +37,6 @@ BuildArch: noarch %description A pytest plugin that allows multiple failures per test. A rewrite of pytest-expect - %prep %setup -q -n pytest_check-%{version}