From 2a663718e178e7d96b6dcd80c74f4cb1d81aab9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 11 Mar 2016 21:56:41 +0100 Subject: [PATCH] Use converted tests converted by 2to3 distutils import tests module from the source code, so we must force it to use the test suite from the absolute path because it will be the converted on in case of 2to3 otherwise we fall-back to the relative module. issue3211 --- tests/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 9499e695f5..31c63fa166 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,9 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -from .test_currency import suite, create_currency, add_currency_rate +try: + from trytond.modules.currency.tests.test_currency import suite +except ImportError: + from .test_currency import suite, create_currency, add_currency_rate __all__ = ['suite', 'create_currency', 'add_currency_rate']