Message221167
This code, prior to 3.4:
from testfixtures import Comparison as C
class AClass:
def __init__(self,x,y=None):
self.x = x
if y:
self.y = y
def __repr__(self):
return '<'+self.__class__.__name__+'>'
...
self.assertEqual(
C('testfixtures.tests.test_comparison.AClass',
y=5, z='missing'),
AClass(1, 2))
Would give the following output in the failure message:
"""
<C(failed):testfixtures.tests.test_comparison.AClass>
x:1 not in Comparison
y:5 != 2
z:'missing' not in other
</C> != <AClass>"
"""
Now, in 3.4, you get the (rather unhelpful):
"""
<C(failed):testfixtures.tests.test_com[79 chars] </C> != <AClass>
"""
It's particularly disappointing that there's no API (class attribute, etc) to control whether or not this new behaviour is enabled.
I believe the change that introduced this behaviour was in [issue18996] |
|
Date |
User |
Action |
Args |
2014-06-21 10:34:46 | cjw296 | set | recipients:
+ cjw296 |
2014-06-21 10:34:46 | cjw296 | set | messageid: <1403346886.23.0.538670310002.issue21820@psf.upfronthosting.co.za> |
2014-06-21 10:34:46 | cjw296 | link | issue21820 messages |
2014-06-21 10:34:45 | cjw296 | create | |
|