demo + utils venv

This commit is contained in:
d3m1g0d
2019-02-03 13:40:10 +01:00
parent 5fa112490b
commit cfa9c8ea23
5994 changed files with 1353819 additions and 0 deletions
@@ -0,0 +1,29 @@
"""
Entrypoint for testing from the top-level namespace
"""
import os
import sys
PKG = os.path.dirname(os.path.dirname(__file__))
def test(extra_args=None):
try:
import pytest
except ImportError:
raise ImportError("Need pytest>=3.0 to run tests")
try:
import hypothesis # noqa
except ImportError:
raise ImportError("Need hypothesis>=3.58 to run tests")
cmd = ['--skip-slow', '--skip-network', '--skip-db']
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__ = ['test']