[PATCH 2 of 5 i18nfield] Fix test

Philippe Pepiot philippe.pepiot at logilab.fr
Tue Mar 17 13:19:18 CET 2020


On 16/03/2020, noe.gaumont at logilab.fr wrote:
> # HG changeset patch
> # User Noe Gaumont <ngaumont at logilab.fr>
> # Date 1584355800 -3600
> #      Mon Mar 16 11:50:00 2020 +0100
> # Node ID eb927e13444bec5b5ed243e2d23ad887bf122c39
> # Parent  2006b8bbebac81a2e884ecea4f267dc7ee779180
> # Available At https://hg.logilab.org/review/cubes/i18nfield
> #              hg pull https://hg.logilab.org/review/cubes/i18nfield -r eb927e13444b
> Fix test
> 
> diff --git a/test/test_automaticWebTest.py b/test/test_automaticWebTest.py
> --- a/test/test_automaticWebTest.py
> +++ b/test/test_automaticWebTest.py
> @@ -18,10 +18,11 @@
>  
>  """cubicweb-i18nfield automatic tests"""
>  
> -from cubicweb.devtools.testlib import AutomaticWebTest
> +import unittest
> +from cubicweb.devtools.testlib import CubicWebTC
>  
>  
> -class AutomaticWebTest(AutomaticWebTest):
> +class AutomaticWebTest(CubicWebTC):

I think this doesn't "Fix test" because there's only one test that
does nothing (pass), the only thing the test is testing is the "cnx.create_entity()" in setup_databases().

AutomaticWebTest has some tests, this is why this class inherited from
it.

Also by testing locally, it seems the test randomly fail, but pass
sometime, this is a real bug (might be related to PYTHONHASHSEED).



More information about the cubicweb-devel mailing list