mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
tests: Move all data directories to data/
This cleans up the file hierarchy a bit Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
4
setup.py
4
setup.py
@@ -621,8 +621,8 @@ class CheckPylint(distutils.core.Command):
|
||||
# pylint: disable=protected-access
|
||||
print("running codespell")
|
||||
codespell_lib._codespell.main(
|
||||
'-I', 'tests/codespell_dict.txt',
|
||||
'--skip', '*.pyc,*.zip,*.vmdk,*.iso,*.xml', *files)
|
||||
'-I', 'tests/data/codespell_dict.txt',
|
||||
'--skip', '*.pyc,*.iso,*.xml', *files)
|
||||
except ImportError:
|
||||
print("codespell is not installed. skipping...")
|
||||
except Exception as e:
|
||||
|
||||
@@ -12,9 +12,12 @@ from virtinst import Capabilities
|
||||
from virtinst import DomainCapabilities
|
||||
|
||||
|
||||
DATADIR = "tests/data/capabilities"
|
||||
|
||||
|
||||
class TestCapabilities(unittest.TestCase):
|
||||
def _buildCaps(self, filename):
|
||||
path = os.path.join("tests/capabilities-xml", filename)
|
||||
path = os.path.join(DATADIR, filename)
|
||||
conn = utils.URIs.open_testdefault_cached()
|
||||
return Capabilities(conn, open(path).read())
|
||||
|
||||
@@ -64,7 +67,7 @@ class TestCapabilities(unittest.TestCase):
|
||||
##############################
|
||||
|
||||
def testDomainCapabilities(self):
|
||||
xml = open("tests/capabilities-xml/test-domcaps.xml").read()
|
||||
xml = open(DATADIR + "/test-domcaps.xml").read()
|
||||
caps = DomainCapabilities(utils.URIs.open_testdriver_cached(), xml)
|
||||
|
||||
self.assertEqual(caps.os.loader.supported, True)
|
||||
@@ -75,7 +78,7 @@ class TestCapabilities(unittest.TestCase):
|
||||
["rom", "pflash"])
|
||||
|
||||
def testDomainCapabilitiesx86(self):
|
||||
xml = open("tests/capabilities-xml/kvm-x86_64-domcaps.xml").read()
|
||||
xml = open(DATADIR + "/kvm-x86_64-domcaps.xml").read()
|
||||
caps = DomainCapabilities(utils.URIs.open_testdriver_cached(), xml)
|
||||
|
||||
self.assertEqual(caps.machine, "pc-i440fx-2.1")
|
||||
|
||||
@@ -30,7 +30,7 @@ os.environ["HOME"] = "/tmp"
|
||||
os.environ["DISPLAY"] = ":3.4"
|
||||
|
||||
TMP_IMAGE_DIR = "/tmp/__virtinst_cli_"
|
||||
XMLDIR = "tests/cli-test-xml"
|
||||
XMLDIR = "tests/data/clitest"
|
||||
OLD_OSINFO = utils.has_old_osinfo()
|
||||
NO_OSINFO_UNATTEND = not unattended.OSInstallScript.have_new_libosinfo()
|
||||
HAS_ISOINFO = shutil.which("isoinfo")
|
||||
@@ -453,7 +453,7 @@ class App(object):
|
||||
# add_valid: A test that should pass
|
||||
# add_invalid: A test that should fail
|
||||
# add_compare: Get the generated XML, and compare against the passed filename
|
||||
# in tests/clitest-xml/compare/
|
||||
# in tests/data/clitest/compare/
|
||||
#
|
||||
|
||||
######################
|
||||
|
||||
@@ -28,7 +28,7 @@ DISKPOOL = "/dev/disk-pool"
|
||||
|
||||
local_files = [FILE1, FILE2]
|
||||
|
||||
clonexml_dir = os.path.join(os.getcwd(), "tests/clone-xml")
|
||||
clonexml_dir = os.path.join(os.getcwd(), "tests/data/clone")
|
||||
|
||||
|
||||
class TestClone(unittest.TestCase):
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-centos65-label.iso"/>
|
||||
<source file="tests/data/clitest/fake-centos65-label.iso"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@@ -39,7 +39,7 @@
|
||||
</disk>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-fedora17-tree.iso"/>
|
||||
<source file="tests/data/clitest/fake-fedora17-tree.iso"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@@ -29,7 +29,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-no-osinfo.iso"/>
|
||||
<source file="tests/data/clitest/fake-no-osinfo.iso"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@@ -34,7 +34,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-f26-netinst.iso"/>
|
||||
<source file="tests/data/clitest/fake-f26-netinst.iso"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@@ -38,7 +38,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-win7.iso"/>
|
||||
<source file="tests/data/clitest/fake-win7.iso"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
@@ -113,7 +113,7 @@
|
||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||
<disk type="file" device="cdrom">
|
||||
<driver name="qemu"/>
|
||||
<source file="tests/cli-test-xml/fake-win7.iso"/>
|
||||
<source file="tests/data/clitest/fake-win7.iso"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user