From bfb789a5b2c6bcb3330c1f8fc16379bce36a9743 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 26 Aug 2020 11:32:46 +0200 Subject: [PATCH] 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 --- src/pybind/mgr/mgr_util.py | 6 +++++- src/pybind/mgr/tox.ini | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.47.3