reconnect moved files to git repo

This commit is contained in:
root
2025-08-01 04:33:03 -04:00
commit 5d3c35492d
23190 changed files with 4750716 additions and 0 deletions

View File

@ -0,0 +1 @@
# Tests for the package behavior of statsmodels

View File

@ -0,0 +1,25 @@
import subprocess
import sys
def test_lazy_imports():
# Check that when statsmodels.api is imported, matplotlib is _not_ imported
cmd = ("import statsmodels.api as sm; "
"import sys; "
"mods = [x for x in sys.modules if 'matplotlib.pyplot' in x]; "
"assert not mods, mods")
cmd = sys.executable + ' -c "' + cmd + '"'
p = subprocess.Popen(cmd, shell=True, close_fds=True)
p.wait()
rc = p.returncode
assert rc == 0
def test_docstring_optimization_compat():
# GH#5235 check that importing with stripped docstrings does not raise
cmd = sys.executable + ' -OO -c "import statsmodels.api as sm"'
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out = p.communicate()
rc = p.returncode
assert rc == 0, out

View File

@ -0,0 +1,10 @@
import pandas as pd
from statsmodels.tsa.x13 import _make_var_names
def test_make_var_names():
# Check that _make_var_names return the current name when exog is
# a pandas Series
exog = pd.Series([1, 2, 3], name="abc")
assert _make_var_names(exog) == exog.name