diff options
author | Philippe Pepiot <philippe.pepiot@logilab.fr> | 2019-11-27 16:54:11 +0100 |
---|---|---|
committer | Philippe Pepiot <philippe.pepiot@logilab.fr> | 2019-11-27 16:54:11 +0100 |
commit | ccf27e634b711af6793221847b04660a0bc7bfa6 (patch) | |
tree | cc77f45c1bb86ffcb8efdad702d0736d2b50bb52 | |
parent | 7c1c2f5f844f5713795f8c0bb83447495c7e2845 (diff) | |
download | logilab-common-ccf27e634b711af6793221847b04660a0bc7bfa6.tar.gz |
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
-rwxr-xr-x | debian/rules | 1 | ||||
-rw-r--r-- | test/unittest_modutils.py | 1 |
2 files changed, 1 insertions, 1 deletions
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') |