Hello community,

here is the log from the commit of package python-sure for openSUSE:Factory 
checked in at 2016-03-16 10:35:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sure (Old)
 and      /work/SRC/openSUSE:Factory/.python-sure.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sure"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sure/python-sure.changes  2015-04-25 
11:23:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-sure.new/python-sure.changes     
2016-03-16 10:35:03.000000000 +0100
@@ -1,0 +2,33 @@
+Wed Mar  9 11:16:30 UTC 2016 - [email protected]
+
+- Update to 1.2.24
+- Fix #48.
+    Ready to fast forward, Python 3.4 support again
+    Fixed a grammar nit when two things are not equal
+    
+- When two things are not equal to each other, they “differ from” each other.
+- fix: #80
+    AttributeError: 'module' object has no attribute '_CallList'
+
+- Fix python3 setup.py file read encoding issue.
+- adding carpentry build
+- fixing api
+
+- New feature:
+  .should.have.thrown() alias to should.throw
+  .should.have.raised() alias to should.throw
+  .should.have.returned_the_value alias ro should.return_value
+
+- make python 3 compatible again
+  The function objects in python 3 have no `func_code` member anymore. Use 
`__code__` instead.
+  The byte objects in python 3 have no `format` method. Use `encode` instead.
+  The representation of the strings and encoded strings are different in 
python 2 and python 3 thus use PY3 from six.
+  Remove unlucky example from README since python 3 returns a float and python 
2 an int in this situation
+  Python 2 and 3 build is working again
+
+-Fix #48.
+  AssertionBuilder.__call__ wasn't pushing through the
+  _callable_args and _callable_kw attributes, so they
+  weren't percolated through the assertion chain.
+
+-------------------------------------------------------------------

Old:
----
  sure-1.2.10.tar.gz

New:
----
  sure-1.2.24.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-sure.spec ++++++
--- /var/tmp/diff_new_pack.HvFOrP/_old  2016-03-16 10:35:05.000000000 +0100
+++ /var/tmp/diff_new_pack.HvFOrP/_new  2016-03-16 10:35:05.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-sure
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,7 +17,7 @@
 
 
 Name:           python-sure
-Version:        1.2.10
+Version:        1.2.24
 Release:        0
 Summary:        Utility belt for automated testing in python for python
 License:        GPL-3.0+

++++++ sure-1.2.10.tar.gz -> sure-1.2.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/PKG-INFO new/sure-1.2.24/PKG-INFO
--- old/sure-1.2.10/PKG-INFO    2015-04-14 18:11:22.000000000 +0200
+++ new/sure-1.2.24/PKG-INFO    2015-08-27 18:58:59.000000000 +0200
@@ -1,13 +1,13 @@
 Metadata-Version: 1.1
 Name: sure
-Version: 1.2.10
+Version: 1.2.24
 Summary: utility belt for automated testing in python for python
 Home-page: http://github.com/gabrielfalcao/sure
 Author: Gabriel Falcao
 Author-email: [email protected]
 License: UNKNOWN
-Description: sure ``1.2.9``
-        ==============
+Description: sure ``1.2.23``
+        ===============
         
         A testing library for python with powerful and flexible assertions. 
Sure
         is heavily inspired by
@@ -50,18 +50,16 @@
         
             (4).should.be.equal(2 + 2)
             (7.5).should.eql(3.5 + 4)
-            (2).should.equal(8 / 4)
         
             (3).shouldnt.be.equal(5)
         
-        {'a': 'collection'}.should.equal({'a': 'collection'}) does deep 
comparison
-        
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+        Assert dictionary and its contents
+        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         
         .. code:: python
         
             {'foo': 'bar'}.should.equal({'foo': 'bar'})
-            {'foo': 'bar'}.should.eql({'foo': 'bar'})
-            {'foo': 'bar'}.must.be.equal({'foo': 'bar'})
+            {'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
         
         "A string".lower().should.equal("a string") also works
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/README.md new/sure-1.2.24/README.md
--- old/sure-1.2.10/README.md   2015-04-14 18:11:20.000000000 +0200
+++ new/sure-1.2.24/README.md   2015-08-27 18:58:58.000000000 +0200
@@ -1,4 +1,4 @@
-# sure `1.2.10`
+# sure `1.2.24`
 
 A testing library for python with powerful and flexible assertions. Sure is 
heavily inspired by [should.js](https://github.com/visionmedia/should.js/)
 
@@ -32,18 +32,15 @@
 
 (4).should.be.equal(2 + 2)
 (7.5).should.eql(3.5 + 4)
-(2).should.equal(8 / 4)
 
 (3).shouldnt.be.equal(5)
 ```
 
-#### {'a': 'collection'}.should.equal({'a': 'collection'}) does deep comparison
+#### Assert dictionary and its contents
 
 ```python
 {'foo': 'bar'}.should.equal({'foo': 'bar'})
-{'foo': 'bar'}.should.eql({'foo': 'bar'})
-{'foo': 'bar'}.must.be.equal({'foo': 'bar'})
-
+{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
 ```
 
 #### "A string".lower().should.equal("a string") also works
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/README.rst new/sure-1.2.24/README.rst
--- old/sure-1.2.10/README.rst  2015-04-14 18:11:15.000000000 +0200
+++ new/sure-1.2.24/README.rst  2015-08-27 18:58:54.000000000 +0200
@@ -1,5 +1,5 @@
-sure ``1.2.9``
-==============
+sure ``1.2.23``
+===============
 
 A testing library for python with powerful and flexible assertions. Sure
 is heavily inspired by
@@ -42,18 +42,16 @@
 
     (4).should.be.equal(2 + 2)
     (7.5).should.eql(3.5 + 4)
-    (2).should.equal(8 / 4)
 
     (3).shouldnt.be.equal(5)
 
-{'a': 'collection'}.should.equal({'a': 'collection'}) does deep comparison
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Assert dictionary and its contents
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 .. code:: python
 
     {'foo': 'bar'}.should.equal({'foo': 'bar'})
-    {'foo': 'bar'}.should.eql({'foo': 'bar'})
-    {'foo': 'bar'}.must.be.equal({'foo': 'bar'})
+    {'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
 
 "A string".lower().should.equal("a string") also works
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/setup.py new/sure-1.2.24/setup.py
--- old/sure-1.2.10/setup.py    2015-04-14 18:11:20.000000000 +0200
+++ new/sure-1.2.24/setup.py    2015-08-27 18:58:58.000000000 +0200
@@ -18,6 +18,7 @@
 
 import ast
 import os
+import sys
 from setuptools import setup, find_packages
 
 
@@ -41,8 +42,10 @@
     return finder.version
 
 
-local_file = lambda *f: \
-    open(os.path.join(os.path.dirname(__file__), *f)).read()
+def local_file( *f):
+    if sys.version_info < (3, 0, 0):
+        return open(os.path.join(os.path.dirname(__file__), *f)).read()
+    return open(os.path.join(os.path.dirname(__file__), *f), 
encoding="utf-8").read()
 
 
 install_requires = ['mock', 'six']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure/__init__.py 
new/sure-1.2.24/sure/__init__.py
--- old/sure-1.2.10/sure/__init__.py    2015-04-14 18:11:20.000000000 +0200
+++ new/sure-1.2.24/sure/__init__.py    2015-08-27 18:58:58.000000000 +0200
@@ -48,7 +48,7 @@
 if PY3:
     basestring = str
 
-version = '1.2.10'
+version = '1.2.24'
 
 
 not_here_error = \
@@ -445,10 +445,13 @@
         self._that = AssertionHelper(self.obj)
 
     def __call__(self, obj):
+
         self.obj = obj
 
         if isinstance(obj, self.__class__):
             self.obj = obj.obj
+            self._callable_args = obj._callable_args
+            self._callable_kw = obj._callable_kw
 
         self._that = AssertionHelper(self.obj)
         return self
@@ -499,6 +502,8 @@
     def to(self):
         return self
 
+    which = to
+
     @assertionproperty
     def when(self):
         return self
@@ -535,6 +540,7 @@
         assert has_it, (
             "%r should have the key `%s` but does not" % (
                 self.obj, name))
+
         return expect(self.obj[name])
 
     @assertionproperty
@@ -645,7 +651,7 @@
             if error:
                 return True
 
-            msg = '%s should differ to %s, but is the same thing'
+            msg = '%s should differ from %s, but is the same thing'
             raise AssertionError(msg % (safe_repr(self.obj), safe_repr(what)))
 
         else:
@@ -804,7 +810,6 @@
 
         return self._that.len_is(num)
 
-    @assertionmethod
     def called_with(self, *args, **kw):
         self._callable_args = args
         self._callable_kw = kw
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure/core.py new/sure-1.2.24/sure/core.py
--- old/sure-1.2.10/sure/core.py        2015-04-14 18:11:20.000000000 +0200
+++ new/sure-1.2.24/sure/core.py        2015-08-27 18:58:58.000000000 +0200
@@ -23,7 +23,12 @@
     from sure.ordereddict import OrderedDict
 
 import os
-import mock
+
+try:
+    from mock import _CallList
+except ImportError:
+    from mock.mock import _CallList
+    
 import inspect
 from six import (
     text_type, integer_types, string_types, binary_type,
@@ -238,10 +243,10 @@
     def compare(self):
         X, Y = self.operands
 
-        if isinstance(X, mock._CallList):
+        if isinstance(X, _CallList):
             X = list(X)
 
-        if isinstance(Y, mock._CallList):
+        if isinstance(Y, _CallList):
             X = list(Y)
 
         c = self.get_context()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure/old.py new/sure-1.2.24/sure/old.py
--- old/sure-1.2.10/sure/old.py 2015-04-14 18:11:20.000000000 +0200
+++ new/sure-1.2.24/sure/old.py 2015-08-27 18:58:58.000000000 +0200
@@ -42,10 +42,10 @@
 
 
 def identify_callable_location(callable_object):
-    filename = os.path.relpath(callable_object.func_code.co_filename)
-    lineno = callable_object.func_code.co_firstlineno
-    callable_name = callable_object.func_code.co_name
-    return b'{0} [{1} line {2}]'.format(callable_name, filename, lineno)
+    filename = os.path.relpath(callable_object.__code__.co_filename)
+    lineno = callable_object.__code__.co_firstlineno
+    callable_name = callable_object.__code__.co_name
+    return '{0} [{1} line {2}]'.format(callable_name, filename, 
lineno).encode()
 
 
 def is_iterable(obj):
@@ -238,7 +238,7 @@
 
         return True
 
-    @explanation('%r should differ to %r, but is the same thing')
+    @explanation('%r should differ from %r, but is the same thing')
     def differs(self, dst):
         return self._src != dst
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure.egg-info/PKG-INFO 
new/sure-1.2.24/sure.egg-info/PKG-INFO
--- old/sure-1.2.10/sure.egg-info/PKG-INFO      2015-04-14 18:11:21.000000000 
+0200
+++ new/sure-1.2.24/sure.egg-info/PKG-INFO      2015-08-27 18:58:59.000000000 
+0200
@@ -1,13 +1,13 @@
 Metadata-Version: 1.1
 Name: sure
-Version: 1.2.10
+Version: 1.2.24
 Summary: utility belt for automated testing in python for python
 Home-page: http://github.com/gabrielfalcao/sure
 Author: Gabriel Falcao
 Author-email: [email protected]
 License: UNKNOWN
-Description: sure ``1.2.9``
-        ==============
+Description: sure ``1.2.23``
+        ===============
         
         A testing library for python with powerful and flexible assertions. 
Sure
         is heavily inspired by
@@ -50,18 +50,16 @@
         
             (4).should.be.equal(2 + 2)
             (7.5).should.eql(3.5 + 4)
-            (2).should.equal(8 / 4)
         
             (3).shouldnt.be.equal(5)
         
-        {'a': 'collection'}.should.equal({'a': 'collection'}) does deep 
comparison
-        
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+        Assert dictionary and its contents
+        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         
         .. code:: python
         
             {'foo': 'bar'}.should.equal({'foo': 'bar'})
-            {'foo': 'bar'}.should.eql({'foo': 'bar'})
-            {'foo': 'bar'}.must.be.equal({'foo': 'bar'})
+            {'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
         
         "A string".lower().should.equal("a string") also works
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure.egg-info/SOURCES.txt 
new/sure-1.2.24/sure.egg-info/SOURCES.txt
--- old/sure-1.2.10/sure.egg-info/SOURCES.txt   2015-04-14 18:11:22.000000000 
+0200
+++ new/sure-1.2.24/sure.egg-info/SOURCES.txt   2015-08-27 18:58:59.000000000 
+0200
@@ -15,9 +15,11 @@
 sure.egg-info/PKG-INFO
 sure.egg-info/SOURCES.txt
 sure.egg-info/dependency_links.txt
+sure.egg-info/pbr.json
 sure.egg-info/requires.txt
 sure.egg-info/top_level.txt
 tests/test_assertion_builder.py
 tests/test_cpython_patches.py
+tests/test_issue_48.py
 tests/test_old_api.py
 tests/test_safe_repr.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/sure.egg-info/pbr.json 
new/sure-1.2.24/sure.egg-info/pbr.json
--- old/sure-1.2.10/sure.egg-info/pbr.json      1970-01-01 01:00:00.000000000 
+0100
+++ new/sure-1.2.24/sure.egg-info/pbr.json      2015-08-27 18:58:59.000000000 
+0200
@@ -0,0 +1 @@
+{"is_release": false, "git_version": "f95b49d"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/tests/test_assertion_builder.py 
new/sure-1.2.24/tests/test_assertion_builder.py
--- old/sure-1.2.10/tests/test_assertion_builder.py     2015-04-14 
18:11:20.000000000 +0200
+++ new/sure-1.2.24/tests/test_assertion_builder.py     2015-08-27 
18:58:58.000000000 +0200
@@ -52,7 +52,7 @@
 
     expect(opposite_not).when.called.to.throw(AssertionError)
     expect(opposite_not).when.called.to.throw(
-        "4 should differ to 4, but is the same thing")
+        "4 should differ from 4, but is the same thing")
 
 
 def test_2_within_0a2():
@@ -378,7 +378,7 @@
 
     expect(opposite).when.called.to.throw(AssertionError)
     expect(opposite).when.called.to.throw(compat_repr(
-        "'John Doe' should differ to 'John Doe', but is the same thing"))
+        "'John Doe' should differ from 'John Doe', but is the same thing"))
 
     expect(opposite_not).when.called.to.throw(AssertionError)
     expect(opposite_not).when.called.to.throw(compat_repr(
@@ -428,7 +428,7 @@
 
     expect(opposite).when.called.to.throw(AssertionError)
     expect(opposite).when.called.to.throw(compat_repr(
-        "'John Doe' should differ to 'John Doe', but is the same thing"))
+        "'John Doe' should differ from 'John Doe', but is the same thing"))
 
     expect(opposite_not).when.called.to.throw(AssertionError)
     expect(opposite_not).when.called.to.throw(compat_repr(
@@ -538,7 +538,7 @@
 
     expect(opposite_not).when.called.to.throw(AssertionError)
     expect(opposite_not).when.called.to.throw(compat_repr(
-        "{'a': 2, 'b': Gabriel Falcão, 'c': 'Foo'} should differ to {'a': 2, 
'b': Gabriel Falcão, 'c': 'Foo'}, but is the same thing"))
+        "{'a': 2, 'b': Gabriel Falcão, 'c': 'Foo'} should differ from {'a': 2, 
'b': Gabriel Falcão, 'c': 'Foo'}, but is the same thing"))
 
 
 def test_match_regex():
@@ -648,13 +648,19 @@
         raise RuntimeError('should not have reached here')
 
     except AssertionError as e:
-        expect(str(e)).to.equal("When calling 'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
+        if PY3:
+            expect(str(e)).to.equal("When calling b'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: 'invalid regex'\n against:\n 'this message'")
+        else:
+            expect(str(e)).to.equal("When calling 'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
 
     try:
         expect(blah).when.called_with(1).should.throw(ValueError, 
re.compile(r'invalid regex'))
         raise RuntimeError('should not have reached here')
     except AssertionError as e:
-        expect(str(e)).to.equal("When calling 'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
+        if PY3:
+            expect(str(e)).to.equal("When calling b'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: 'invalid regex'\n against:\n 'this message'")
+        else:
+            expect(str(e)).to.equal("When calling 'blah 
[tests/test_assertion_builder.py line 633]' the exception message does not 
match. Expected to match regex: u'invalid regex'\n against:\n u'this message'")
 
 def test_should_not_be_different():
     ("'something'.should_not.be.different('SOMETHING'.lower())")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sure-1.2.10/tests/test_issue_48.py 
new/sure-1.2.24/tests/test_issue_48.py
--- old/sure-1.2.10/tests/test_issue_48.py      1970-01-01 01:00:00.000000000 
+0100
+++ new/sure-1.2.24/tests/test_issue_48.py      2015-08-27 18:58:58.000000000 
+0200
@@ -0,0 +1,7 @@
+import sure
+
+def raise_err(foobar):
+    raise ValueError()
+
+def test_issue_48():
+    raise_err.when.called_with('asdf').should.throw(ValueError)


Reply via email to