Skip to content

Commit

Permalink
Merge pull request #279 from bashtage/test-pyargs
Browse files Browse the repository at this point in the history
BLD: Use pyargs to test
  • Loading branch information
bashtage authored Mar 27, 2019
2 parents c6f8c14 + 59ead55 commit e8251a0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
3 changes: 2 additions & 1 deletion arch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from arch._version import get_versions
from arch.univariate.mean import arch_model
from arch.utility import test

__version__ = get_versions()['version']
del get_versions
Expand All @@ -10,4 +11,4 @@ def doc():
webbrowser.open('http://arch.readthedocs.org/en/latest/')


__all__ = ['arch_model', '__version__', 'doc']
__all__ = ['arch_model', '__version__', 'doc', 'test']
23 changes: 22 additions & 1 deletion arch/utility/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
import os
import sys

from arch.utility.cov import cov_nw

__all__ = ['cov_nw']
PKG = os.path.dirname(os.path.dirname(__file__))


def test(extra_args=None):
try:
import pytest
except ImportError:
raise ImportError("Need pytest to run tests")
cmd = []
if extra_args:
if not isinstance(extra_args, list):
extra_args = [extra_args]
cmd = extra_args
cmd += [PKG]
print("running: pytest {}".format(' '.join(cmd)))
sys.exit(pytest.main(cmd))


__all__ = ['cov_nw', 'test']
8 changes: 0 additions & 8 deletions pyproject.toml

This file was deleted.

0 comments on commit e8251a0

Please sign in to comment.