code: def test_adf():
      # Test where k = 1
      test = ADFTest(alpha=0.05, k=1)
      pval, do_diff = test.should_diff(austres)
  
      # R's value: 0.8488036
      # > adf.test(austres, k=1, alternative='stationary')$p.value
      assert np.isclose(pval, 0.8488036)
      assert do_diff
  
      # Test for k = 2. R's value: 0.7060733
      # > adf.test(austres, k=2, alternative='stationary')$p.value
      test = ADFTest(alpha=0.05, k=2)
      pval, do_diff = test.should_diff(austres)
      assert np.isclose(pval, 0.7060733)
      assert do_diff
  
      # Test for k is None. R's value: 0.3493465
      # > adf.test(austres, alternative='stationary')$p.value
      test = ADFTest(alpha=0.05, k=None)
      pval, do_diff = test.should_diff(austres)
      assert np.isclose(pval, 0.3493465, rtol=0.0001)
      assert do_diff
  
file_path: pmdarima/pmdarima/arima/tests/test_stationarity.py
imports: from pmdarima.arima.stationarity import ADFTest, PPTest, KPSSTest
  from pmdarima.arima.utils import ndiffs
  from pmdarima.utils.array import diff
  from pmdarima.datasets import load_austres
  from sklearn.utils import check_random_state
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_array_equal
  import numpy
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_adf() without return types