[PATCH v2] tests: fix assertion rewriting in some tests with pytest-3.0.0+
Thomas De Schampheleire
patrickdepinguin at gmail.com
Sun Sep 18 19:17:31 UTC 2016
On Tue, Sep 13, 2016 at 11:27 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 09/13/2016 09:54 PM, Thomas De Schampheleire wrote:
>>
>> Having the entire set under
>> kallithea/tests/ seems more future-proof.
>>
>> It seems the trailing dot is accepted and does what I hoped it does.
>> v3 is coming up...
>
>
> I agree with the commit message in the posted v3, but the patch content
> doesn't seem to be what is described?
>
> I guess the chosen solution is to have
>
> pytest.register_assert_rewrite('kallithea.tests.')
>
> in tests/__init__.py but move helper functions (and constants?) out and put
> them in something like common.py or base.py ?
>
The location of the register was indeed wrong. The fact of not moving
the existing code to a separate file was intentional and seen as
future improvement, because I thought it would require changes in each
test, but in fact it is not true, and I'm cooking up a v4 that will do
that.
/Thomas
More information about the kallithea-general
mailing list