class_docstr: Test utils.py.
class_docstr_tok: ["Test","utils.py","."]
docstr: Test function _perm_pval.
docstr_tok: ["Test","function","_perm_pval","."]
code: def test_perm_pval(self):
      """Test function _perm_pval."""
      np.random.seed(123)
      bootstat = np.random.normal(size=1000)
      x = -2
      up = _perm_pval(bootstat, x, alternative="greater")
      low = _perm_pval(bootstat, x, alternative="less")
      two = _perm_pval(bootstat, x, alternative="two-sided")
      assert up > low
      assert up + low == 1
      assert low < two < up
      x = 2.5
      up = _perm_pval(bootstat, x, alternative="greater")
      low = _perm_pval(bootstat, x, alternative="less")
      two = _perm_pval(bootstat, x, alternative="two-sided")
      assert low > up
      assert up + low == 1
      assert up < two < low
  
file_path: pingouin/pingouin/tests/test_utils.py
imports: import pandas
  import numpy
  import pytest
  import pingouin
  from unittest import TestCase
  from pingouin.utils import print_table, _postprocess_dataframe, _get_round_setting_for, _perm_pval, _check_eftype, _check_dataframe, remove_na, _flatten_list, _is_sklearn_installed, _is_statsmodels_installed, _is_mpmath_installed
label_desc: Use image node_id 5 for calling the TestUtils obj's underlying member method code with example usage: obj.test_perm_pval() without return types