code: def test_fractions(self):
      # check special case for fractions where either the numerator
      # or the denominator is a multiple of _PyHASH_MODULUS
      self.assertEqual(hash(F(1, _PyHASH_MODULUS)), _PyHASH_INF)
      self.assertEqual(hash(F(-1, 3 * _PyHASH_MODULUS)), -_PyHASH_INF)
      self.assertEqual(hash(F(7 * _PyHASH_MODULUS, 1)), 0)
      self.assertEqual(hash(F(-_PyHASH_MODULUS, 1)), 0)
  
      # The numbers ABC doesn't enforce that the "true" division
      # of integers produces a float.  This tests that the
      # Rational.__float__() method has required type conversions.
      x = F._from_coprime_ints(DummyIntegral(1), DummyIntegral(2))
      self.assertRaises(TypeError, lambda: x.numerator / x.denominator)
      self.assertEqual(float(x), 0.5)
  
imports: import unittest
  import random
  import math
  import sys
  import operator
  from decimal import Decimal
  from fractions import Fraction
label_desc: Use image node_id 7 for calling the HashTest obj's underlying member method code with example usage: obj.test_fractions() without return types