提交 c3426e95 编写于 作者: M Mikhail Korobov

TST fix tests that became broken after adding top-level imports and switching to py.test.

py.test replaces AssertionError exception with its own subclass in an import hook.
For some reason when top-level shortcuts were added "except AssertionError" in
contracts.__init__ meant "except py.test AssertionError" while scrapy.exceptions.ContractFail
was still a subclass of a builtin AssertionError, so Contracts reported errors
instead of failures and this made tests in test_contracts.py fail.

For now - just disable fancy py.test asserts.
上级 11e62117
......@@ -2,4 +2,4 @@
[pytest]
usefixtures = chdir setlog
python_files=test_*.py __init__.py
addopts = --doctest-modules
addopts = --doctest-modules --assert=plain
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册