Bug 790845 - 2.7.3: massive test failures on some architectures (reopened).

Fix some test failures caused by erroneous size assumptions.
This commit is contained in:
John Ralls
2018-01-14 16:21:34 -08:00
parent 2257faa05a
commit 8900b19da3
3 changed files with 11 additions and 3 deletions

View File

@@ -312,11 +312,11 @@ class GncNumeric(GnuCashCoreClass):
raise TypeError('Only two ints allowed: ' + str(args))
elif len(args) == 3:
if type(args[0]) == float \
and type(args[1]) == type(GNC_DENOM_AUTO) \
and type(args[1]) in (int, long) \
and type(args[2]) == type(GNC_HOW_DENOM_FIXED):
return double_to_gnc_numeric(*args)
else:
raise TypeError('Only (float, GNC_HOW_RND_*, GNC_HOW_RND_*, GNC_HOW_RND_*) allowed: ' + str(args))
raise TypeError('Only (float, int/long, GNC_HOW_RND_*) allowed: ' + str(args))
else:
raise TypeError('Required single int/float/str or two ints: ' + str(args))