docstr: assert that 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
docstr_tok: ["assert","that","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"]
code: def assertFloatsAreIdentical(self, x, y):
      """assert that 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
  
      """
      msg = "floats {!r} and {!r} are not identical"
  
      if isnan(x) or isnan(y):
          if isnan(x) and isnan(y):
              return
      elif x == y:
          if x != 0.0:
              return
          # both zero; check that signs match
          elif copysign(1.0, x) == copysign(1.0, y):
              return
          else:
              msg += ": zeros have different signs"
      self.fail(msg.format(x, y))
  
imports: import unittest
  import sys
  from test import support
  from test.test_grammar import VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS
  from random import random
  from math import atan2, isnan, copysign
  import operator
label_desc: Use image node_id 3 for calling the ComplexTest obj's underlying member method code with example usage: obj.assertFloatsAreIdentical(x, y) without return types