code: def test_str(self, alternative):
      rng = np.random.default_rng(
          189117774084579816190295271136455278291
      )
  
      res = stats.dunnett(
          *self.samples_3,
          control=self.control_3,
          alternative=alternative,
          random_state=rng,
      )
  
      # check some str output
      res_str = str(res)
      assert "(Sample 2 - Control)" in res_str
      assert "95.0%" in res_str
  
      if alternative == "less":
          assert "-inf" in res_str
          assert "19." in res_str
      elif alternative == "greater":
          assert "inf" in res_str
          assert "-13." in res_str
      else:
          assert "inf" not in res_str
          assert "21." in res_str
  
file_path: scipy/scipy/stats/tests/test_multicomp.py
imports: import copy
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from scipy import stats
  from scipy.stats._multicomp import _pvalue_dunnett, DunnettResult
label_desc: Use image node_id 6 for calling the TestDunnett obj's underlying member method code with example usage: obj.test_str(alternative) without return types