Test assertions for tuples with floats
Posted
by Space_C0wb0y
on Stack Overflow
See other posts from Stack Overflow
or by Space_C0wb0y
Published on 2010-06-11T13:07:51Z
Indexed on
2010/06/11
13:23 UTC
Read the original article
Hit count: 248
I have a function that returns a tuple that, among others, contains a float value. Usually I use assertAlmostEquals
to compare those, but this does not work with tuples. Also, the tuple contains other data-types as well. Currently I am asserting every element of the tuple individually, but that gets too much for a list of such tuples. Is there any good way to write assertions for such cases?
© Stack Overflow or respective owner