[PATCH] tests: fix assertion rewriting in some tests with pytest-3.0.0+

Mads Kiilerich mads at kiilerich.com
Fri Sep 9 14:21:17 UTC 2016


On 09/09/2016 04:03 PM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1473428048 -7200
> #      Fri Sep 09 15:34:08 2016 +0200
> # Node ID 6889d3b7435f1c4bb91d24a3af7774323ecbc778
> # Parent  59639343672495cb89be54b98f1d6d3a4c44307c
> tests: fix assertion rewriting in some tests with pytest-3.0.0+

Thanks ... but that fails with pytest < 3.

I can wrap it with
if getattr(pytest, 'register_assert_rewrite', None):
... or we could desupport pytest < 3. But I guess this shows that it can 
be convenient to keep the old version around a bit.

/Mads


More information about the kallithea-general mailing list