code: def test_long_fromdouble(self):
      # Test PyLong_FromDouble()
      fromdouble = _testcapi.pylong_fromdouble
      float_max = sys.float_info.max
      for value in (
          5.0,
          5.1,
          5.9,
          -5.1,
          -5.9,
          0.0,
          -0.0,
          float_max,
          -float_max,
      ):
          with self.subTest(value=value):
              self.assertEqual(fromdouble(value), int(value))
      self.assertRaises(OverflowError, fromdouble, float("inf"))
      self.assertRaises(OverflowError, fromdouble, float("-inf"))
      self.assertRaises(ValueError, fromdouble, float("nan"))
  
imports: import unittest
  import sys
  from test.support import import_helper
label_desc: Use image node_id 5 for calling the LongTests obj's underlying member method code with example usage: obj.test_long_fromdouble() without return types