提交 0e0f613f authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Raise shape and optimization errors by default during testing

上级 6d55c43b
......@@ -42,7 +42,7 @@ docstyle:
format:
@printf "Checking code format with black...\n"
black -t py36 --check ${PROJECT_DIR} tests/ setup.py
black -t py36 --check ${PROJECT_DIR} tests/ setup.py conftest.py
@printf "\033[1;34mBlack passes!\033[0m\n\n"
style:
......@@ -51,7 +51,7 @@ style:
@printf "\033[1;34mPylint passes!\033[0m\n\n"
black: # Format code in-place using black.
black ${PROJECT_DIR} tests/ setup.py
black ${PROJECT_DIR} tests/ setup.py conftest.py
test: # Test code using pytest.
pytest -v tests/ ${PROJECT_DIR} --cov=${PROJECT_DIR} --cov-report=xml --html=testing-report.html --self-contained-html
......
import os
import pytest
def pytest_sessionstart(session):
os.environ["THEANO_FLAGS"] = ",".join(
[
os.environ.setdefault("THEANO_FLAGS", ""),
"warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise",
]
)
def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="run slow tests"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论