Sync from SUSE:SLFO:Main python-testfixtures revision c8e2b6b2f3fefc0dfa1532d47c8477d3

This commit is contained in:
Adrian Schröter 2024-05-03 23:14:13 +02:00
commit dc7b196a9e
4 changed files with 396 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

291
python-testfixtures.changes Normal file
View File

@ -0,0 +1,291 @@
-------------------------------------------------------------------
Tue Dec 13 17:36:55 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 7.0.4
* Remove py.typed file: neither mypy nor testfixtures are ready for this file to be present.
-------------------------------------------------------------------
Wed Nov 9 19:29:23 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 7.0.3 (3 Nov 2022)
* Further bugfixes around self-referential datastructures and :func:`compare`.
- Update to 7.0.2 (1 Nov 2022)
* Reinstate support for self-referential data structures in :func:`compare`. The new implementation provides more clarity about
what's going on and also ignores more immutable data types.
- Update to 7.0.1 (1 Nov 2022)
* Remove non-functional support for self-referential data structures in :func:`compare`. The functionality didn't work but did cause
erroneous reported equality of values in dictionaries that were actually not equal.
-------------------------------------------------------------------
Tue Oct 4 15:30:20 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Remove testfixtures-sybil3-py310.patch, it's included in upstream now.
- Update to 7.0.0
* Refresh documentation.
* Add type annotations.
* Drop support for Python 2. The minimum supported Python version is now 3.6.
* Sybil 3 is now the minimum supported version if you use
:class:`~.sybil.FileParser`.
* Rename and refactor the date and time mocks, they are now :any:`mock_date`,
:any:`mock_datetime` and :any:`mock_time`. :func:`test_date`,
:func:`test_datetime` and :func:`test_time` are still present as aliases
but are now deprecated.
* Add :meth:`TempDirectory.as_string`, :meth:`TempDirectory.as_path` and
:meth:`TempDirectory.as_local`. :meth:`TempDirectory.getpath` is now
deprecated.
* :class:`TempDirectory` can now be used to wrap existing directories.
* Fixed a bug where :any:`OutputCapture.captured` returned bytes instead of a
string with fd=True.
* The deprecated strict option to :class:`Comparison` has been removed, use
the partial option instead.
* The deprecated :meth:`TempDirectory.check`, :meth:`TempDirectory.check_dir`
and :meth:`TempDirectory.check_all` methods have been removed.
- 6.18.5 (1 Mar 2022)
* Fix bug in detection of Mock backport.
- 6.18.4 (25 Feb 2022)
* Ensure compatibility with Sybil 2 and Sybil 3 along with pytest 6 and
pytest 7.
-------------------------------------------------------------------
Sun Dec 26 09:32:40 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Replace testfixtures-pr167-sybil3.patch by
testfixtures-sybil3-py310.patch -- gh#simplistix/testfixtures#167
- Don't test Django on python36: Django 4 dropped support for
Python < 3.8
-------------------------------------------------------------------
Tue Dec 21 18:13:58 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Add testfixtures-pr167-sybil3.patch
* gh#simplistix/testfixtures#167
-------------------------------------------------------------------
Thu Oct 7 15:01:20 UTC 2021 - Ben Greiner <code@bnavigator.de>
- update to 6.18.3
* Fix bug when using :func:`compare` on two regular expressions
that have very long patterns.
* Fix bug that meant :class:`LogCapture` didn't preserve or
provide a clean testing environment for filters.
* Fix bug when showing differences between mappings found by
:func:`compare` when mismatching values contained the same
number more than once.
* Add support for lazy resolution of prefix and suffix when using
:func:`compare`.
- Drop appease-django-320.patch merged upstream
- Drop unresolvable Python 2 build
-------------------------------------------------------------------
Sun May 9 17:11:41 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 6.17.1
- Fix bug where bug where duplicated entries in an ordered but partial
:class:`SequenceComparison` could result in a failed match.
-------------------------------------------------------------------
Wed Apr 28 07:49:55 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Add appease-django-320.patch:
* Upstream patch to avoid a test failure with building with Django 3.2
-------------------------------------------------------------------
Fri Dec 18 09:50:52 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- update to v6.17.0
* Add simpler flag support to `StringComparison`.
* Fix deprecation warning about invalid escape sequence.
- from v6.16.0
* Clarify the documentation of timezones when using `test_datetime`
* :doc:`api` has been re-arranged to make it easier to browse.
* The strict parameter to `Comparison` has been deprecated
in favour of partial.
* Add `SequenceComparison`, `Subset` and `Permutation` objects.
* Add `MappingComparison` objects.
* Officially support Python 3.9.
-------------------------------------------------------------------
Sun Nov 29 18:59:58 UTC 2020 - ecsos <ecsos@opensuse.org>
- update to 6.15.0:
- Add support to :class:LogCapture for making sure log entries above a specified level have been checked.
-------------------------------------------------------------------
Wed Sep 16 21:30:17 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 6.14.2:
- Fix bug where ``ignore_eq`` had no effect on nested objects when using :func:`compare`
- remove python383.patch (upstream)
-------------------------------------------------------------------
Tue Jun 23 15:51:53 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- use local source dir for pytest imports (tests are not installed)
gh#openSUSE/python-rpm-macros#48
-------------------------------------------------------------------
Tue May 19 10:20:08 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix build with python 3.8.3:
* python383.patch
- Update to 6.14.1:
* Fix bugs in comparison of :func:`~unittest.mock.call` objects where the :func:`repr` of the :func:`~unittest.mock.call` arguments were the same even when their attributes were not.
-------------------------------------------------------------------
Thu Mar 12 08:05:21 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix build without python2
-------------------------------------------------------------------
Wed Mar 11 12:16:59 UTC 2020 - pgajdos@suse.com
- version update to 6.14.0
6.14.0 (24 Feb 2020)
--------------------
- Add support for non-deterministic logging order when using :meth:`twisted.LogCapture`.
6.13.1 (20 Feb 2020)
--------------------
- Fix for using :func:`compare` to compare two-element :func:`~unittest.mock.call`
objects.
6.13.0 (18 Feb 2020)
--------------------
- Allow any attributes that need to be ignored to be specified directly when calling
:func:`~testfixtures.comparison.compare_object`. This is handy when writing
comparers for :func:`compare`.
6.12.1 (16 Feb 2020)
--------------------
- Fix a bug that occured when using :func:`compare` to compare a string with a
slotted object that had the same :func:`repr` as the string.
6.12.0 (6 Feb 2020)
-------------------
- Add support for ``universal_newlines``, ``text``, ``encoding`` and ``errors`` to
:class:`popen.MockPopen`, but only for Python 3.
6.11.0 (29 Jan 2020)
--------------------
- :class:`decimal.Decimal` now has better representation when :func:`compare` displays a failed
comparison, particularly on Python 2.
- Add support to :func:`compare` for explicitly naming objects to be compared as ``x`` and ``y``.
This allows symmetry with the ``x_label`` and ``y_label`` parameters that are now documented.
- Restore ability for :class:`Comparison` to compare properties and methods, although these uses
are not recommended.
6.10.3 (22 Nov 2019)
--------------------
- Fix bug where new-style classes had their attributes checked with :func:`compare` even
when they were of different types.
6.10.2 (15 Nov 2019)
--------------------
- Fix bugs in :func:`compare` when comparing objects which have both ``__slots__``
and a ``__dict__``.
6.10.1 (1 Nov 2019)
-------------------
- Fix edge case where string interning made dictionary comparison output much less useful.
-------------------------------------------------------------------
Mon Jul 22 12:42:25 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 6.10.0:
* Better feedback where objects do not :func:`compare` equal but do have the same representation.
-------------------------------------------------------------------
Mon Jun 17 10:12:42 UTC 2019 - pgajdos@suse.com
- version update to 6.9.0
- Fix deprecation warning relating to :func:`getargspec`.
- Improve :doc:`mocking <mocking>` docs.
- Add ``strip_whitespace`` option to :class:`OutputCapture`.
- When ``separate`` is used with :class:`OutputCapture`, differences in ``stdout` and ``stderr``
are now given in the same :class:`AssertionError`.
- :class:`ShouldRaise` no longer catches exceptions that are not of the required type.
- Fixed a problem that resulted in unhelpful :func:`compare` failures when
:func:`~unittest.mock.call` was involved and Python 3.6.7 was used.
-------------------------------------------------------------------
Tue May 21 08:14:30 UTC 2019 - pgajdos@suse.com
- version update to 6.8.2
* Fix handling of the latest releases of the :mod:`mock` backport.
* Fix bogus import in :class:`OutputCapture`.
* Allow :class:`OutputCapture` to capture the underlying file descriptors for
:attr:`sys.stdout` and :attr:`sys.stderr`.
* Silence :class:`DeprecationWarning` relating to ``collections.abc`` on
Python 3.7.
-------------------------------------------------------------------
Thu Apr 18 14:41:23 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- update to version 6.7.0
* Add :meth:`twisted.LogCapture.raise_logged_failure` debugging
helper.
-------------------------------------------------------------------
Tue Mar 26 22:09:06 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Add docs/*.txt to %docs
- Remove tests from the runtime package
- Update to v6.6.2
* popen.MockPopen.set_command is now symmetrical with
popen.MockPopen process instantiation in that both can be called with
either lists or strings, in the same way as subprocess.Popen.
- from 6.6.1
* Fixed bugs where using 'not_there' to ensure a key or attribute
was not there but would be set by a test would result in the test
attribute or key being left behind.
* Add support for comparing functools.partial instances and fix
comparison of functions and other objects where vars() returns
an empty dict.
- from v6.6.0
* Add the ability to ignore attributes of particular object types when
using `compare`.
- from v6.5.2
* Fix bug when `compare` was used with objects that had __slots__ inherited
from a base class but where their __slots__ was an empty sequence.
- from v6.5.1
* Fix bug when `compare` was used with objects that had __slots__ inherited
from a base class.
-------------------------------------------------------------------
Wed Feb 13 17:52:51 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Update to version 6.5.0
See changes.rst for list of changes since version 5.3.1
- Remove many unnecessary build dependencies
- Activate tests
- Add Suggests for Django, Twisted, sybil and zope.component
-------------------------------------------------------------------
Tue Feb 5 16:07:51 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Remove unnecessary build dependencies
-------------------------------------------------------------------
Tue Dec 4 12:55:09 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Fri Jan 5 09:58:02 UTC 2018 - alarrosa@suse.com
- Update to version 5.3.1
* Fix missing support for the start_new_session parameter to
~testfixtures.popen.MockPopen.
-------------------------------------------------------------------
Fri Nov 17 10:49:24 UTC 2017 - alarrosa@suse.com
- Update to version 5.3.0
* Add pytest traceback hiding for TempDirectory.compare.
* Add warnings that log_capture, tempdir and replace are not
currently compatible with pytest's fixtures mechanism.
* Better support for stdout or stderr *not* being set to PIPE
when using testfixtures.popen.MockPopen.
* Add support to testfixtures.popen.MockPopen for
using subprocess.Popen as a context manager in Python 3.
* Add support to testfixtures.popen.MockPopen for stderr=STDOUT.
* Work done on testfixtures.popen.MockPopen.
-------------------------------------------------------------------
Tue Sep 26 18:47:13 UTC 2017 - t.gruner@katodev.de
- Initial release version 5.2.0

79
python-testfixtures.spec Normal file
View File

@ -0,0 +1,79 @@
#
# spec file for package python-testfixtures
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
Name: python-testfixtures
Version: 7.0.4
Release: 0
Summary: A collection of helpers and mock objects for unit tests and doc tests
License: MIT
URL: https://github.com/Simplistix/testfixtures
Source: https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module pytest >= 3.6}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sybil >= 3}
BuildRequires: %{python_module zope.component}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module Django if (%python-base without python36-base)}
BuildRequires: %{python_module pytest-django if (%python-base without python36-base)}
Suggests: python-Django
Suggests: python-Twisted
Suggests: python-sybil >= 3
Suggests: python-zope.component
BuildArch: noarch
%python_subpackages
%description
TestFixtures is a collection of helpers and mock objects that are
useful when writing unit tests or doc tests.
If you're wondering why "yet another mock object library", testing is
often described as an art form and as such some styles of library will
suit some people while others will suit other styles. This library
contains common test fixtures the author found himself
repeating from package to package and so decided to extract them into
their own library and give them some tests of their own!
%prep
%setup -q -n testfixtures-%{version}
%autopatch -p1
chmod a-x docs/*.txt
%build
%python_build
%install
%python_install
%python_expand rm -r %{buildroot}%{$python_sitelib}/testfixtures/tests
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings
export PYTHONPATH=$(pwd)
python36_flags="--ignore testfixtures/tests/test_django"
%pytest testfixtures/tests ${$python_flags}
%files %{python_files}
%license LICENSE.txt
%doc README.rst docs/*.txt
%{python_sitelib}/testfixtures
%{python_sitelib}/testfixtures-%{version}*-info
%changelog

BIN
testfixtures-7.0.4.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.