Ejemplo n.º 1
0
 def get_testfixture_by_name(self, name):
     xpath = "./testfixtures/testfixture[@name='%s']" % name
     fixture_element = self.__root.find(xpath)
     if fixture_element is None:
         raise ValueError("Can't get TestFixture element by path: %s" % xpath)
     return TestFixtureFactory.build_testfixture_by_element(fixture_element)
Ejemplo n.º 2
0
 def get_all_testfixtures(self):
     benches = []
     for benchelement in list(self.__root.find("testfixtures")):
         bench = TestFixtureFactory.build_testfixture_by_element(benchelement)
         benches.append(bench)
     return benches