code: def test_alternatives(self, alternative, pvalue):
      rng = np.random.default_rng(
          114184017807316971636137493526995620351
      )
  
      # width of 20 and min diff between samples/control is 60
      # and maximal diff would be 100
      sample_less = rng.integers(0, 20, size=(10,))
      control = rng.integers(80, 100, size=(10,))
      sample_greater = rng.integers(160, 180, size=(10,))
  
      res = stats.dunnett(
          sample_less,
          sample_greater,
          control=control,
          alternative=alternative,
          random_state=rng,
      )
      assert_allclose(res.pvalue, pvalue, atol=1e-7)
  
      ci = res.confidence_interval()
      # two-sided is comparable for high/low
      if alternative == "less":
          assert np.isneginf(ci.low).all()
          assert -100 < ci.high[0] < -60
          assert 60 < ci.high[1] < 100
      elif alternative == "greater":
          assert -100 < ci.low[0] < -60
          assert 60 < ci.low[1] < 100
          assert np.isposinf(ci.high).all()
      elif alternative == "two-sided":
          assert -100 < ci.low[0] < -60
          assert 60 < ci.low[1] < 100
          assert -100 < ci.high[0] < -60
          assert 60 < ci.high[1] < 100
  
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 4 for calling the TestDunnett obj's underlying member method code with example usage: obj.test_alternatives(alternative, pvalue) without return types