From: Sebastian Wagner Date: Wed, 26 Aug 2020 09:32:46 +0000 (+0200) Subject: pybind/mgr: don't load cython modules X-Git-Tag: v16.1.0~1310^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36811%2Fhead;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 38dc8624567..ffb0f54c4a1 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 25da70072c7..02561a49a30 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