test_parameters: Ignore specific error message

In Python 3, the error message from the decimal module is
less clear than before.
(It's apparently the price to pay for speed -- Python3 uses
libmpdec as its Decimal implementation by default.)

Don't check for the exact error message.

https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Petr Viktorin 2015-09-21 13:22:17 +02:00 committed by Jan Cholasta
parent 2541b5fcbf
commit 91e5435c8b

View File

@ -1441,8 +1441,7 @@ class test_Decimal(ClassChecker):
param = self.cls('my_number', precision=1)
e = raises(ConversionError, param, '123456789012345678901234567890')
assert str(e) == \
"invalid 'my_number': quantize result has too many digits for current context"
assert str(e).startswith("invalid 'my_number': ")
def test_exponential(self):
"""