pytest assert introspection in helper function

后端 未结 1 1429
余生分开走
余生分开走 2020-12-29 08:34

pytest does wonderful assert introspection so it is easy to find differences in strings especially if the difference is in white space. Now I use a

相关标签:
1条回答
  • 2020-12-29 09:06

    I had to put the register_assert_rewrite into tests/__init__.py like so:

    import pytest
    
    # we want to have pytest assert introspection in the helpers
    pytest.register_assert_rewrite('tests.helpers')
    
    0 讨论(0)
提交回复
热议问题