code: def test_str(self):
      svals = [0.0, -0.0, 1, -1, np.inf, -np.inf, np.nan]
      styps = [np.float16, np.float32, np.float64, np.longdouble]
      wanted = [
          ["0.0", "0.0", "0.0", "0.0"],
          ["-0.0", "-0.0", "-0.0", "-0.0"],
          ["1.0", "1.0", "1.0", "1.0"],
          ["-1.0", "-1.0", "-1.0", "-1.0"],
          ["inf", "inf", "inf", "inf"],
          ["-inf", "-inf", "-inf", "-inf"],
          ["nan", "nan", "nan", "nan"],
      ]
  
      for wants, val in zip(wanted, svals):
          for want, styp in zip(wants, styps):
              msg = "for str({}({}))".format(
                  np.dtype(styp).name, repr(val)
              )
              assert_equal(str(styp(val)), want, err_msg=msg)
  
file_path: catboost/contrib/python/numpy/py3/numpy/core/tests/test_scalarprint.py
imports: import code
  import platform
  import pytest
  import sys
  from tempfile import TemporaryFile
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, IS_MUSL
label_desc: Use image node_id 1 for calling the TestRealScalars obj's underlying member method code with example usage: obj.test_str() without return types