Ep9 fddlmZmZGddZGddZGddZGdd eZy ) )copysignisnancLeZdZd dZd dZd dZd dZd dZd dZd dZ d d Z y) ExtraAssertionsNcnt||ry|d|}|j|j||y)Nz is not a subclass of  issubclassfail_formatMessageselfcls superclassmsg standardMsgs s ;8+    II.se4 5 ; II3H,> ?   SXXa[(--*: ;   S[[(*:*: ;   S0#h6I6I2J KCNNH,?,?@1**1a0ArN)rr6r7rDr8rrr:r:=s1rr:ceZdZdZy)FloatsAreIdenticalMixincd}t|s t|rt|r6t|r+y||k(r%|dk7rytd|td|k(ry|dz }|j|j||y)a#Fail unless floats x and y are identical, in the sense that: (1) both x and y are nans, or (2) both x and y are infinities, with the same sign, or (3) both x and y are zeros, with the same sign, or (4) x and y are both finite and nonzero, and x == y z&floats {!r} and {!r} are not identicalNgg?z: zeros have different signs)rrr format)r xyrs rassertFloatsAreIdenticalz0FloatsAreIdenticalMixin.assertFloatsAreIdenticalYsr7 8uQxQxE!H !VCx#q!Xc1%5555 #**Q"#rN)rr6r7rOr8rrrJrJXs$rrJceZdZdZy)ComplexesAreIdenticalMixinc|j|j|j|j|j|jy)zFail unless complex numbers x and y have equal values and signs. In particular, if x and y both have real (or imaginary) part zero, but the zeros have different signs, this test will fail. N)rOrealimag)r rMrNs rassertComplexesAreIdenticalz6ComplexesAreIdenticalMixin.assertComplexesAreIdenticalrs4 %%affaff5 %%affaff5rN)rr6r7rUr8rrrQrQqs6rrQN)mathrrrr:rJrQr8rrrWs6 6K6Kr116$$2 6!8 6r