tests: Replace 'scriptimports' with a much simpler method

This commit is contained in:
Cole Robinson 2013-04-13 15:33:19 -04:00
parent 0d243983d0
commit 1771f6a300
9 changed files with 12 additions and 7 deletions

5
.gitignore vendored
View File

@ -2,6 +2,11 @@
*.pyc
*.gmo
virt-clonec
virt-convertc
virt-imagec
virt-installc
/.coverage
/MANIFEST

View File

@ -420,7 +420,6 @@ class CheckPylint(Command):
print "running pep8"
cmd = "pep8 "
cmd += "--exclude scriptimports "
cmd += " ".join(files)
os.system(cmd + " --config tests/pep8.cfg")

View File

@ -15,6 +15,7 @@
# MA 02110-1301 USA.
import atexit
import imp
import logging
import os
import shlex
@ -27,9 +28,13 @@ import StringIO
import virtinst.cli
from tests.scriptimports import virtinstall, virtimage, virtclone, virtconvert
from tests import utils
virtinstall = imp.load_source("virtinstall", "virt-install")
virtimage = imp.load_source("virtimage", "virt-image")
virtclone = imp.load_source("virtclone", "virt-clone")
virtconvert = imp.load_source("virtconvert", "virt-convert")
os.environ["VIRTCONV_TEST_NO_DISK_CONVERSION"] = "1"
os.environ["LANG"] = "en_US.UTF-8"

View File

@ -12,7 +12,7 @@ profile=no
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=scriptimports
#ignore=
# Pickle collected data for later comparisons.
persistent=yes

View File

@ -1 +0,0 @@
../../virt-clone

View File

@ -1 +0,0 @@
../../virt-convert

View File

@ -1 +0,0 @@
../../virt-image

View File

@ -1 +0,0 @@
../../virt-install