File python-unittest2.spec of Package python-unittest2

# spec file for package python-unittest2
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-unittest2
Version:        1.1.0
Release:        lp151.67.4
Summary:        The new features in unittest for Python 2.7 backported to Python 2.3+
License:        BSD-3-Clause
# PATCH-FIX-OPENSUSE relax-argparse.patch
Patch1:         relax-argparse.patch
BuildRequires:  %{python_module linecache2}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six}
BuildRequires:  %{python_module traceback2}
BuildRequires:  python-rpm-macros
Requires:       python-six
Requires:       python-traceback2
Requires(post): update-alternatives
Requires(preun): update-alternatives
BuildArch:      noarch

unittest2 is a backport of the new features added to the unittest testing
framework in Python 2.7. It is tested to run on Python 2.4 - 2.7.

%setup -q -n unittest2-%{version}
%patch1 -p1


%python_clone -a %{buildroot}%{_bindir}/unit2

%python_install_alternative unit2

%python_uninstall_alternative unit2

%files %{python_files}
%doc README.txt
%python_alternative %{_bindir}/unit2

* Thu Oct 17 2019 Tomáš Chvátal <>
- Remove pyparsing buildignore as the cycle was solved
* Thu Jan 17 2019 Dominique Leuenberger <>
- BuildIgnore python[23]-pyparsing: python-packaging requires it
  for some actions it could perform, but we don't make use of these
  here. Ignoring this dependency allows us to break open a
* Fri Aug 10 2018
- Drop the devel dependency
* Wed Nov  8 2017
- Do not require arparse at all - it is already part of python
* Mon Jul  3 2017
- Fix Source url
* Mon May 22 2017
- Convert to singlespec
- Add relax-argparse.patch
* Wed Mar 15 2017
- Add Provides for python2-unittest2 . Needed for the singlespec
* Mon Aug 15 2016
- Fix update-alternatives implementation.
* Tue Oct 13 2015
- Implement update-alternatives
* Mon Oct 12 2015
- update to version 1.1.0:
  * Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns()
    and assertWarnsRegex() assertments now check the type of the first
    argument to prevent possible user error. Based on patch by Daniel
  * Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns()
    and assertWarnsRegex() checks now emits a deprecation warning when
    callable is None or keyword arguments except msg is passed in the
    context manager mode.
  * Issue #22903: The fake test case created by unittest.loader when
    it fails importing a test module is now picklable.
- update to version 1.0.1:
  * Unittest2 issue #94: Need at least 1.4 of six.
- update to version 1.0.0:
  * Issue #22936: Permit showing local variables in tracebacks.
- specfile:
  * added traceback2, linecache2 requirement
  * Implement update-alternatives
* Mon Dec  1 2014
- Update to 0.8
  * Issue #22457: Honour load_tests in the start_dir of discovery.
  * 0.7.1:
  - Fix for 0.7.0 being broken. Also switches from both manual and entrypoint
    scripts to just entrypoint scripts to reduce the possibility of similar
    oversights in future.
  * 0.7.0
  - This release contains backports from cPython 3.5 of all (I think) commits
    since 2010, as of today.
  * 0.6.0
  - Changed supported Python versions to start at 2.6, and include all released
    3.x and pypy. (Robert Collins)
  - Invoking `unit2` without args starts test discovery
  - Added `TestCase.assertWarns` and `TestCase.assertWarnsRegexp` context
  - Fix Python issue 9926. TestSuite subclasses that override __call__ are
    called correctly.
  - Removed unused `maxDiff` parameter from `TestCase.assertSequenceEqual`.
  - DeprecationWarning for unsupported result objects (missing addSkip
    method) became RuntimeWarning.
  - Addition of `TestCase.assertWarns` as a context manager.
- removed py3k tarball, was not used and does not exist for 0.8.0 anymore
* Sat Jun  9 2012
- python3 package added
- spec file improved (files section)
* Fri Sep  2 2011
- Cleaned up spec file
- Changed license to BSD-3-Clause
* Tue Aug 10 2010
- initial package (0.5.1)
openSUSE Build Service is sponsored by