Bug 1433390 - Use register_assert_rewrite to enable introspection in assertion helper. r=jgraham

Pytest by default only loads test modules, and enables assert
introspection for them. For any helper method which also uses
asserts, only a plain assertion is printed.

To enable introspection also for the assertion helper, the
module has to be registered for assertion rewrite.

MozReview-Commit-ID: 97JzuykXxWE

--HG--
extra : rebase_source : b83516bbb943d36b76a344b36b5ac9d508eba3d0
This commit is contained in:
Henrik Skupin 2018-01-26 11:25:31 +01:00
Родитель ceb19abec5
Коммит c2f488c6a0
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,4 @@
import pytest
# Enable pytest assert introspection for assertion helper
pytest.register_assert_rewrite('tests.support.asserts')