Change in vdsm[master]: virt: tests: More testVideoXML tests

fromani at redhat.com fromani at redhat.com
Mon Dec 14 13:11:00 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: virt: tests: More testVideoXML tests
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/50420/1/tests/deviceTests.py
File tests/deviceTests.py:

Line 303:          """<video>
Line 304:          <model heads="2" ram="65536" type="qxl" vgamem="8192" vram="32768"/>
Line 305:          </video>"""]
Line 306:     ])
Line 307:     def testVideoXML(self, dev_spec, video_xml):
I wonder if this could be clearer using a module-private constant, which could probably be formatted in a nicer way.

Like maybe:

  _VIDEO_DEVICES_TEST = [
    [{'device': 'vga', 'specParams': {'vram': '32768', 'heads': '2'}},
      """
      <video>
        <model heads="2" type="vga" vram="32768"/>
      </video>
      """],
      #...
      [{'device': 'qxl', 'specParams': {'vram': '32768', 'heads': '2', 'ram': '65536', 'vgamem': '8192'}},
       """
       <video>
         <model heads="2" ram="65536" type="qxl" vgamem="8192" vram="32768"/>
       </video>
       """],
  ]

What do you think?
Line 308:         video = vmdevices.core.Video(self.conf, self.log, **dev_spec)
Line 309:         self.assertXMLEqual(video.getXML().toxml(), video_xml)
Line 310: 
Line 311:     def testInterfaceXML(self):


-- 
To view, visit https://gerrit.ovirt.org/50420
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I581f6e3c9cd72d98e3cecf89bd1d6b40b9109229
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list