From: Sebastian Wagner Date: Wed, 26 Aug 2020 09:32:46 +0000 (+0200) Subject: pybind/mgr: don't load cython modules X-Git-Tag: v17.0.0~1342^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bfb789a5b2c6bcb3330c1f8fc16379bce36a9743;p=ceph.git pybind/mgr: don't load cython modules Most of the tests already require the cython modules to be mocked. This is the final step in making pytest independent of those modules. Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/mgr_util.py b/src/pybind/mgr/mgr_util.py index 38dc86245679c..ffb0f54c4a182 100644 --- a/src/pybind/mgr/mgr_util.py +++ b/src/pybind/mgr/mgr_util.py @@ -1,8 +1,12 @@ +import os + +if 'UNITTEST' in os.environ: + import tests + import cephfs import contextlib import datetime import errno -import os import socket import time import logging diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 25da70072c7a0..02561a49a30e2 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -28,8 +28,6 @@ addopts = [testenv] setenv = UNITTEST = true - PYTHONPATH = ../../../build/lib/cython_modules/lib.3/ - LD_LIBRARY_PATH = ../../../build/lib deps = cython -rrequirements.txt