Hello community, here is the log from the commit of package python-fixtures for openSUSE:Factory checked in at 2014-09-17 17:25:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-fixtures (Old) and /work/SRC/openSUSE:Factory/.python-fixtures.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fixtures" Changes: -------- --- /work/SRC/openSUSE:Factory/python-fixtures/python-fixtures.changes 2014-06-04 18:39:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-fixtures.new/python-fixtures.changes 2014-09-17 17:25:27.000000000 +0200 @@ -1,0 +2,11 @@ +Mon Sep 15 09:16:54 UTC 2014 - tbecht...@suse.com + +- update to version 0.3.16: + * Fixed 0.3.15 on Python 2.6 - version info is a plain tuple there. + * ``FakePopen`` now supports being called under a context manager (IE: with). + * ``FakeProcess`` now supports kill(). + * ``FakeProcess`` wait() now supports arguments added in Python 3. + * ``MonkeyPatch`` now preserves ``staticmethod`` functions. +- Add python-testtools as Requires + +------------------------------------------------------------------- Old: ---- fixtures-0.3.14.tar.gz New: ---- fixtures-0.3.16.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-fixtures.spec ++++++ --- /var/tmp/diff_new_pack.034fTu/_old 2014-09-17 17:25:28.000000000 +0200 +++ /var/tmp/diff_new_pack.034fTu/_new 2014-09-17 17:25:28.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-fixtures -Version: 0.3.14 +Version: 0.3.16 Release: 0 Summary: Fixtures, reusable state for writing clean tests and more License: Apache-2.0 or BSD-3-Clause @@ -36,6 +36,7 @@ %else BuildArch: noarch %endif +Requires: python-testtools %description Fixtures defines a Python contract for reusable state / support logic, ++++++ fixtures-0.3.14.tar.gz -> fixtures-0.3.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/NEWS new/fixtures-0.3.16/NEWS --- old/fixtures-0.3.14/NEWS 2013-08-16 05:03:21.000000000 +0200 +++ new/fixtures-0.3.16/NEWS 2014-08-22 06:29:11.000000000 +0200 @@ -6,6 +6,32 @@ NEXT ~~~~ +0.3.16 +~~~~~~ + +CHANGES +------- + +* Fixed 0.3.15 on Python 2.6 - version info is a plain tuple there. + (Robert Collins) + +0.3.15 +~~~~~~ + +CHANGES +------- + +* ``FakePopen`` now supports being called under a context manager (IE: with). + (Steve Kowalik) + +* ``FakeProcess`` now supports kill(). (Steve Kowalik) + +* ``FakeProcess`` wait() now supports arguments added in Python 3. + (Steve Kowalik) + +* ``MonkeyPatch`` now preserves ``staticmethod`` functions. + (Dan Kenigsberg) + 0.3.14 ~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/PKG-INFO new/fixtures-0.3.16/PKG-INFO --- old/fixtures-0.3.14/PKG-INFO 2013-08-16 05:04:44.000000000 +0200 +++ new/fixtures-0.3.16/PKG-INFO 2014-08-22 06:31:02.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: fixtures -Version: 0.3.14 +Version: 0.3.16 Summary: Fixtures, reusable state for writing clean tests and more. Home-page: https://launchpad.net/python-fixtures Author: Robert Collins diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/lib/fixtures/__init__.py new/fixtures-0.3.16/lib/fixtures/__init__.py --- old/fixtures-0.3.14/lib/fixtures/__init__.py 2013-08-16 05:03:41.000000000 +0200 +++ new/fixtures-0.3.16/lib/fixtures/__init__.py 2014-08-22 06:29:29.000000000 +0200 @@ -36,7 +36,7 @@ # established at this point, and setup.py will use a version of next-$(revno). # If the releaselevel is 'final', then the tarball will be major.minor.micro. # Otherwise it is major.minor.micro~$(revno). -__version__ = (0, 3, 14, 'final', 0) +__version__ = (0, 3, 16, 'final', 0) __all__ = [ 'ByteStream', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/lib/fixtures/_fixtures/monkeypatch.py new/fixtures-0.3.16/lib/fixtures/_fixtures/monkeypatch.py --- old/fixtures-0.3.14/lib/fixtures/_fixtures/monkeypatch.py 2013-07-03 22:36:53.000000000 +0200 +++ new/fixtures-0.3.16/lib/fixtures/_fixtures/monkeypatch.py 2014-08-22 06:30:21.000000000 +0200 @@ -17,6 +17,9 @@ 'MonkeyPatch' ] +import sys +import types + from fixtures import Fixture @@ -62,6 +65,11 @@ if old_value is sentinel: self.addCleanup(self._safe_delete, current, attribute) else: + # Python 2's setattr transforms function into instancemethod + if (sys.version_info[0] == 2 and + isinstance(current, (type, types.ClassType)) and + isinstance(old_value, types.FunctionType)): + old_value = staticmethod(old_value) self.addCleanup(setattr, current, attribute, old_value) def _safe_delete(self, obj, attribute): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/lib/fixtures/_fixtures/popen.py new/fixtures-0.3.16/lib/fixtures/_fixtures/popen.py --- old/fixtures-0.3.14/lib/fixtures/_fixtures/popen.py 2013-08-16 04:59:09.000000000 +0200 +++ new/fixtures-0.3.16/lib/fixtures/_fixtures/popen.py 2014-08-22 04:55:32.000000000 +0200 @@ -48,7 +48,16 @@ err = '' return out, err - def wait(self): + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.wait() + + def kill(self): + pass + + def wait(self, timeout=None, endtime=None): if self.returncode is None: self.communicate() return self.returncode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/lib/fixtures/tests/_fixtures/test_monkeypatch.py new/fixtures-0.3.16/lib/fixtures/tests/_fixtures/test_monkeypatch.py --- old/fixtures-0.3.14/lib/fixtures/tests/_fixtures/test_monkeypatch.py 2013-07-03 22:36:53.000000000 +0200 +++ new/fixtures-0.3.16/lib/fixtures/tests/_fixtures/test_monkeypatch.py 2014-08-22 04:34:16.000000000 +0200 @@ -19,6 +19,11 @@ reference = 23 +class C(object): + @staticmethod + def foo(): pass +def bar(): pass + class TestMonkeyPatch(testtools.TestCase, TestWithFixtures): def test_patch_and_restore(self): @@ -66,3 +71,13 @@ finally: fixture.cleanUp() self.assertFalse('new_attr' in globals()) + + def test_patch_staticmethod(self): + oldfoo = C.foo + fixture = MonkeyPatch( + 'fixtures.tests._fixtures.test_monkeypatch.C.foo', + bar) + with fixture: + pass + self.assertEqual(oldfoo, C.foo) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/lib/fixtures/tests/_fixtures/test_popen.py new/fixtures-0.3.16/lib/fixtures/tests/_fixtures/test_popen.py --- old/fixtures-0.3.14/lib/fixtures/tests/_fixtures/test_popen.py 2013-08-16 05:03:01.000000000 +0200 +++ new/fixtures-0.3.16/lib/fixtures/tests/_fixtures/test_popen.py 2014-08-22 04:55:32.000000000 +0200 @@ -72,6 +72,11 @@ self.assertEqual(1, proc.wait()) self.assertEqual(1, proc.returncode) + def test_with_popen_custom(self): + fixture = self.useFixture(FakePopen()) + with subprocess.Popen(['ls -lh']) as proc: + self.assertEqual(None, proc.returncode) + class TestFakeProcess(testtools.TestCase): @@ -89,3 +94,11 @@ proc = FakeProcess({}, {'stdout': BytesIO(_b('foo'))}) self.assertEqual((_b('foo'), ''), proc.communicate()) self.assertEqual(0, proc.returncode) + + def test_kill(self): + proc = FakeProcess({}, {}) + self.assertIs(None, proc.kill()) + + def test_wait_with_timeout_and_endtime(self): + proc = FakeProcess({}, {}) + self.assertEqual(0 , proc.wait(timeout=4, endtime=7)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fixtures-0.3.14/setup.py new/fixtures-0.3.16/setup.py --- old/fixtures-0.3.14/setup.py 2013-08-16 05:04:31.000000000 +0200 +++ new/fixtures-0.3.16/setup.py 2014-08-22 06:28:40.000000000 +0200 @@ -6,7 +6,7 @@ description = open(os.path.join(os.path.dirname(__file__), 'README'), 'rt').read() setup(name="fixtures", - version="0.3.14", + version="0.3.16", description="Fixtures, reusable state for writing clean tests and more.", keywords="fixture fixtures unittest contextmanager", long_description=description, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org