def test_get_ui_file(self):
        good_cases = [
            ('test1.xml', 'test1.xml'),
            (['test2.xml'], 'test2.xml'),
            (['test3','resource.xml'], path.join('test3','resource.xml'))
        ]

        for argument, solution in good_cases:
            self.assertEqual(solution, resource.get_ui_file(argument))
예제 #2
0
def parse_ui_from_resource(creator, window, resource_id):
    filepath = get_ui_file(resource_id)
    loader = UILoader(creator, window, filepath)
    return loader.extract()