code: def test_ttest_ind(self, alternative):
      # check that `dunnett` agrees with `ttest_ind`
      # when there are only two groups
      rng = np.random.default_rng(
          114184017807316971636137493526995620351
      )
  
      for _ in range(10):
          sample = rng.integers(-100, 100, size=(10,))
          control = rng.integers(-100, 100, size=(10,))
  
          res = stats.dunnett(
              sample,
              control=control,
              alternative=alternative,
              random_state=rng,
          )
          ref = stats.ttest_ind(
              sample, control, alternative=alternative, random_state=rng
          )
  
          assert_allclose(
              res.statistic, ref.statistic, rtol=1e-3, atol=1e-5
          )
          assert_allclose(res.pvalue, ref.pvalue, rtol=1e-3, atol=1e-5)
  
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 3 for calling the TestDunnett obj's underlying member method code with example usage: obj.test_ttest_ind(alternative) without return types