]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: add python-common/ceph to MYPYPATH and pytest PYTHONPATH
authorAdam King <adking@redhat.com>
Mon, 21 Oct 2024 15:04:10 +0000 (11:04 -0400)
committerAdam King <adking@redhat.com>
Wed, 30 Oct 2024 14:12:11 +0000 (10:12 -0400)
Otherwise the unit tests will fail trying to import from here.

Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/tox.ini

index 20608c1681ce1196f1578192017353df9d5aa506..7658b3b31f9a8cfea317a85a47aa3ad813ea688b 100644 (file)
@@ -24,6 +24,10 @@ exclude =
 statistics = True
 
 [testenv]
+setenv =
+    PYTHONPATH = $PYTHONPATH:..:{toxinidir}/../python-common
+passenv =
+    PYTHONPATH
 skip_install=true
 deps =
   -rzipapp-reqs.txt
@@ -35,6 +39,10 @@ deps =
 commands=pytest {posargs}
 
 [testenv:mypy]
+setenv =
+    MYPYPATH = {toxinidir}/..:{toxinidir}/../python-common
+passenv =
+    MYPYPATH
 deps =
     mypy
     types-PyYAML