Hello community,
here is the log from the commit of package python-flexmock for openSUSE:Factory checked in at 2019-04-02 09:21:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flexmock (Old)
and /work/SRC/openSUSE:Factory/.python-flexmock.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-flexmock"
Tue Apr 2 09:21:38 2019 rev:4 rq:689382 version:0.10.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flexmock/python-flexmock.changes 2019-03-13 09:14:33.583390886 +0100
+++ /work/SRC/openSUSE:Factory/.python-flexmock.new.25356/python-flexmock.changes 2019-04-02 09:21:52.216687124 +0200
@@ -1,0 +2,10 @@
+Thu Mar 28 14:27:55 UTC 2019 - Tomáš Chvátal
+
+- Update to 0.10.4:
+ - drop Python 2.6, 3.3 and Jython support
+ - add Python 3.6 and 3.7 support
+ - don't hide exception when flexmock is used as context manager
+ - fix expectation reset for static methods on pypy 2
+ - ensure original exception isn't suppressed in pytest hook
+
+-------------------------------------------------------------------
Old:
----
flexmock-0.10.3.tar.gz
New:
----
flexmock-0.10.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-flexmock.spec ++++++
--- /var/tmp/diff_new_pack.U5yOEh/_old 2019-04-02 09:21:53.112687963 +0200
+++ /var/tmp/diff_new_pack.U5yOEh/_new 2019-04-02 09:21:53.112687963 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-flexmock
-Version: 0.10.3
+Version: 0.10.4
Release: 0
Summary: Testing library for creating mocks, stubs and fakes
License: BSD-2-Clause
++++++ flexmock-0.10.3.tar.gz -> flexmock-0.10.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/CHANGELOG new/flexmock-0.10.4/CHANGELOG
--- old/flexmock-0.10.3/CHANGELOG 2019-01-10 13:39:40.000000000 +0100
+++ new/flexmock-0.10.4/CHANGELOG 2019-03-25 10:58:29.000000000 +0100
@@ -1,3 +1,12 @@
+Release 0.10.4
+--------------
+
+- drop Python 2.6, 3.3 and Jython support
+- add Python 3.6 and 3.7 support
+- don't hide exception when flexmock is used as context manager
+- fix expectation reset for static methods on pypy 2
+- ensure original exception isn't suppressed in pytest hook
+
Release 0.10.3
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/PKG-INFO new/flexmock-0.10.4/PKG-INFO
--- old/flexmock-0.10.3/PKG-INFO 2019-01-10 13:42:45.000000000 +0100
+++ new/flexmock-0.10.4/PKG-INFO 2019-03-25 11:04:06.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flexmock
-Version: 0.10.3
+Version: 0.10.4
Summary: flexmock is a testing library for Python that makes it easy to create mocks,stubs and fakes.
Home-page: http://flexmock.readthedocs.org
Author: Slavek Kabrda, Herman Sheremetyev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/docs/conf.py new/flexmock-0.10.4/docs/conf.py
--- old/flexmock-0.10.3/docs/conf.py 2019-01-10 13:39:56.000000000 +0100
+++ new/flexmock-0.10.4/docs/conf.py 2019-03-25 10:58:48.000000000 +0100
@@ -18,7 +18,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('..'))
# -- General configuration ------------------------------------------------
@@ -51,7 +51,7 @@
# built documents.
#
# The short X.Y version.
-version = '0.10.3'
+version = '0.10.4'
# The full version, including alpha/beta/rc tags.
release = version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/docs/index.rst new/flexmock-0.10.4/docs/index.rst
--- old/flexmock-0.10.3/docs/index.rst 2019-01-07 12:30:58.000000000 +0100
+++ new/flexmock-0.10.4/docs/index.rst 2019-03-14 15:35:27.000000000 +0100
@@ -51,14 +51,13 @@
Tested to work with:
-- python 2.6
- python 2.7
-- python 3.3
- python 3.4
- python 3.5
+- python 3.6
+- python 3.7
- pypy
- pypy3
-- jython
Automatically integrates with all major test runners, including:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/flexmock.egg-info/PKG-INFO new/flexmock-0.10.4/flexmock.egg-info/PKG-INFO
--- old/flexmock-0.10.3/flexmock.egg-info/PKG-INFO 2019-01-10 13:42:45.000000000 +0100
+++ new/flexmock-0.10.4/flexmock.egg-info/PKG-INFO 2019-03-25 11:04:06.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flexmock
-Version: 0.10.3
+Version: 0.10.4
Summary: flexmock is a testing library for Python that makes it easy to create mocks,stubs and fakes.
Home-page: http://flexmock.readthedocs.org
Author: Slavek Kabrda, Herman Sheremetyev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/flexmock.py new/flexmock-0.10.4/flexmock.py
--- old/flexmock-0.10.3/flexmock.py 2019-01-10 13:40:04.000000000 +0100
+++ new/flexmock-0.10.4/flexmock.py 2019-03-25 10:59:04.000000000 +0100
@@ -25,7 +25,7 @@
# from flexmock import * is evil, keep it from doing any damage
__all__ = ['flexmock']
-__version__ = '0.10.3'
+__version__ = '0.10.4'
import inspect
@@ -662,7 +662,14 @@
type(_mock.__dict__) is dict):
_mock.__dict__[name] = original
else:
- setattr(_mock, name, original)
+ if self.method_type == staticmethod and sys.version_info < (3, 0):
+ # on some Python 2 implementations (e.g. pypy), just assigning
+ # the original staticmethod would make it a normal method,
+ # thus an additional "self" argument would be passed to it,
+ # we need to explicitly cast it to staticmethod
+ setattr(_mock, name, staticmethod(original))
+ else:
+ setattr(_mock, name, original)
del self
@@ -686,7 +693,7 @@
return self._object
def __exit__(self, type, value, traceback):
- return self
+ pass
def __call__(self, *kargs, **kwargs):
"""Hack to make Expectation.mock() work with parens."""
@@ -1229,7 +1236,7 @@
else:
teardown = runner.CallInfo(flexmock_teardown, when=when)
teardown.result = None
- if ret.excinfo is not None and teardown.excinfo is None:
+ if ret.excinfo is not None:
teardown.excinfo = ret.excinfo
return teardown
runner.call_runtest_hook = call_runtest_hook
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/setup.py new/flexmock-0.10.4/setup.py
--- old/flexmock-0.10.3/setup.py 2019-01-10 13:40:16.000000000 +0100
+++ new/flexmock-0.10.4/setup.py 2019-03-25 10:59:17.000000000 +0100
@@ -6,7 +6,7 @@
from distutils.core import setup
setup(name='flexmock',
- version='0.10.3',
+ version='0.10.4',
author='Slavek Kabrda, Herman Sheremetyev',
author_email='slavek@redhat.com',
url='http://flexmock.readthedocs.org',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/tests/flexmock_pytest_test.py new/flexmock-0.10.4/tests/flexmock_pytest_test.py
--- old/flexmock-0.10.3/tests/flexmock_pytest_test.py 2019-01-07 12:30:58.000000000 +0100
+++ new/flexmock-0.10.4/tests/flexmock_pytest_test.py 2019-03-25 10:57:22.000000000 +0100
@@ -6,6 +6,9 @@
import pytest
+pytestmark = pytest.mark.pytest
+
+
def test_module_level_test_for_pytest():
flexmock(foo='bar').should_receive('foo').once
assertRaises(MethodCallError, flexmock_teardown)
@@ -36,6 +39,25 @@
class TestFailureOnException(object):
+ def _setup_failing_expectation(self):
+ flexmock(foo='bar').should_receive('foo').once
+
+ # Use xfail to ensure we process exceptions as returned by _hook_into_pytest
+
@pytest.mark.xfail(raises=RuntimeError)
def test_exception(self):
raise RuntimeError("TEST ERROR")
+
+ @pytest.mark.xfail(raises=MethodCallError)
+ def test_flexmock_raises_if_no_exception(self):
+ self._setup_failing_expectation()
+
+ @pytest.mark.xfail(raises=RuntimeError)
+ def test_flexmock_doesnt_override_existing_exception(self):
+ self._setup_failing_expectation()
+ raise RuntimeError("Flexmock shouldn't suppress this exception")
+
+ @pytest.mark.xfail(raises=AssertionError)
+ def test_flexmock_doesnt_override_assertion(self):
+ self._setup_failing_expectation()
+ assert False, "Flexmock shouldn't suppress this assertion"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flexmock-0.10.3/tests/run_tests.sh new/flexmock-0.10.4/tests/run_tests.sh
--- old/flexmock-0.10.3/tests/run_tests.sh 2019-01-07 12:30:58.000000000 +0100
+++ new/flexmock-0.10.4/tests/run_tests.sh 2019-01-10 13:54:09.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/bash
PYTHON_IMPLEMENTATIONS=${PYTHON_IMPLEMENTATIONS:-"python pypy jython"}
-python_VERSIONS=${PYTHON_VERSIONS:-"2.6 2.7 3.3 3.4 3.5"}
+python_VERSIONS=${PYTHON_VERSIONS:-"2.7 3.3 3.4 3.5"}
pypy_VERSIONS=${PYPY_VERSIONS:-"nover 3"}
jython_VERSIONS=${JYTHON_VERSIONS:-"nover"}
@@ -40,7 +40,6 @@
if [[ "$RUNNERS" =~ nose ]]; then
if $pyexec -c 'import nose' 2>/dev/null; then
echo nose for $pyexec
- # can't use "-m nose" with 2.6: python2.6: nose is a package and cannot be directly executed
$pyexec -m nose.__main__ $TEST_PATH/flexmock_nose_test.py
[[ $? -ne 0 ]] && EXIT_CODE=1
else