p3.4+ compat.

This commit is contained in:
Markus Padourek 2016-09-12 14:54:49 +01:00
parent dd72759396
commit e362471b39

View File

@ -46,7 +46,8 @@ def test_field_default_value_not_callable():
try:
Field(MyType, default_value=lambda: True)
except AssertionError as e:
assert str(e) == 'The default value can not be a function but received "<type \'function\'>".'
# substring comparison for py 2/3 compatibility
assert 'The default value can not be a function but received' in str(e)
def test_field_source():