From ccf27e634b711af6793221847b04660a0bc7bfa6 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Wed, 27 Nov 2019 16:54:11 +0100 Subject: Fix modutils tests in debian package logilab-pytest has a side effect of printing DeprecationWarnings by default, when running modutils tests without logilab-pytest binary this fail. In debian package we run python3 -m "logilab.common.pytest" and thus DeprecationWarning are not displayed and tests fail. Fix this by ensuring DeprecationWarning are displayed before running tests of unittest_modutils.py --- debian/rules | 1 - test/unittest_modutils.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index af22b21..6760ad9 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,6 @@ #export DH_VERBOSE=1 export PYBUILD_NAME=logilab-common -export PYBUILD_DISABLE=test PACKAGE3:=python3-logilab-common %: diff --git a/test/unittest_modutils.py b/test/unittest_modutils.py index ec2a5c8..7af241e 100644 --- a/test/unittest_modutils.py +++ b/test/unittest_modutils.py @@ -34,6 +34,7 @@ from os import path, getcwd, sep from logilab import common from logilab.common import tree +warnings.simplefilter('default', DeprecationWarning) sys.path.insert(0, path.dirname(__file__)) DATADIR = path.join(path.dirname(__file__), 'data') -- cgit v1.2.1