# # spec file for package python-unittest2 # # Copyright (c) 2014 SUSE LINUX Products 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 http://bugs.opensuse.org/ # Name: python-unittest2 Version: 1.1.0 Release: 1.1 Url: http://pypi.python.org/pypi/unittest2 Summary: The new features in unittest for Python 2.7 backported to Python 2.3+ License: BSD-3-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/u/unittest2/unittest2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-argparse BuildRequires: python-linecache2 BuildRequires: python-setuptools BuildRequires: python-six BuildRequires: python-traceback2 Requires: python-argparse Requires: python-linecache2 Requires: python-six Requires: python-traceback2 Requires(post): update-alternatives Requires(postun): update-alternatives %if 0%{?suse_version} && 0%{?suse_version} > 1110 BuildArch: noarch %else %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif %description 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. %prep %setup -q -n unittest2-%{version} %build python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} # Prepare for update-alternatives usage mkdir -p %{buildroot}%{_sysconfdir}/alternatives mv %{buildroot}%{_bindir}/unit2 %{buildroot}%{_bindir}/unit2-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/unit2 %{buildroot}%{_bindir}/unit2 # create a dummy target for /etc/alternatives/unit2 touch %{buildroot}%{_sysconfdir}/alternatives/unit2 %post "%_sbindir/update-alternatives" \ --install %{_bindir}/unit2 unit2 %{_bindir}/unit2-%{py_ver} 30 %postun if [ $1 -eq 0 ] ; then "%_sbindir/update-alternatives" --remove unit2 %{_bindir}/unit2-%{py_ver} fi %files %defattr(-,root,root,-) %doc README.txt %{_bindir}/unit2 %{_bindir}/unit2-%{py_ver} %ghost %{_sysconfdir}/alternatives/unit2 %{python_sitelib}/unittest2 %{python_sitelib}/unittest2-%{version}-py*.egg-info %changelog * Tue Oct 13 2015 toddrme2178@gmail.com - Implement update-alternatives * Mon Oct 12 2015 toddrme2178@gmail.com - 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 Wagner-Hall. * 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 rhafer@suse.com - 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 managers - 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 highwaystar.ru@gmail.com - python3 package added - spec file improved (files section) * Fri Sep 2 2011 saschpe@suse.de - Cleaned up spec file - Changed license to BSD-3-Clause * Tue Aug 10 2010 pascal.bleser@opensuse.org - initial package (0.5.1)