mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-10 00:59:41 +03:00
sanitytest: stop passing python module path into sanity test
We want to move over to make sanitytest.py operate like a more normal
test script, which means making it self contained.
The setup.py already sets the PYTHONPATH thanks to changes introduced
in:
commit eaded7bdad
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Tue Mar 18 11:11:48 2014 +0000
Add support for running unit tests with nose
so passing the python module path into sanitytest.py is redundant.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@ -4,10 +4,6 @@ import sys
|
||||
import lxml
|
||||
import lxml.etree
|
||||
from typing import Dict, List, Set, Tuple # noqa F401
|
||||
|
||||
if len(sys.argv) >= 2:
|
||||
# Munge import path to insert build location for libvirt mod
|
||||
sys.path.insert(0, sys.argv[1])
|
||||
import libvirt
|
||||
|
||||
|
||||
|
2
setup.py
2
setup.py
@ -310,7 +310,7 @@ class my_test(Command):
|
||||
os.environ["PYTHONPATH"] = self.build_platlib
|
||||
|
||||
if "LIBVIRT_API_COVERAGE" in os.environ:
|
||||
self.spawn([sys.executable, "sanitytest.py", self.build_platlib])
|
||||
self.spawn([sys.executable, "sanitytest.py"])
|
||||
pytest = self.find_pytest_path()
|
||||
subprocess.check_call([pytest])
|
||||
|
||||
|
Reference in New Issue
Block a user