]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: don't load cython modules 36811/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Wed, 26 Aug 2020 09:32:46 +0000 (11:32 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 26 Aug 2020 10:36:18 +0000 (12:36 +0200)
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 <sebastian.wagner@suse.com>
src/pybind/mgr/mgr_util.py
src/pybind/mgr/tox.ini

index 38dc86245679c043b129efda087de62f1769b2f7..ffb0f54c4a1822a0fe34af6b78ce7e56a606afc9 100644 (file)
@@ -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
index 25da70072c7a0436e90d458f485acd5af05516d6..02561a49a30e29a8fcd8218339bf38b3fd581143 100644 (file)
@@ -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