def load_expected(test_manifest, metadata_path, test_path, tests, property_order=None, boolean_properties=None): expected_manifest = manifestupdate.get_manifest( metadata_path, test_path, test_manifest.url_base, property_order=property_order, boolean_properties=boolean_properties) if expected_manifest is None: return tests_by_id = {item.id: item for item in tests} # Remove expected data for tests that no longer exist for test in expected_manifest.iterchildren(): if not test.id in tests_by_id: test.remove() # Add tests that don't have expected data for test in tests: if not expected_manifest.has_test(test.id): expected_manifest.append( manifestupdate.TestNode.create(test.item_type, test.id)) return expected_manifest
def load_expected(url_base, metadata_path, test_path, tests, property_order=None, boolean_properties=None): expected_manifest = manifestupdate.get_manifest(metadata_path, test_path, url_base, property_order=property_order, boolean_properties=boolean_properties) if expected_manifest is None: return # Remove expected data for tests that no longer exist for test in expected_manifest.iterchildren(): if test.id not in tests: test.remove() return expected_manifest
def load_expected(url_base, metadata_path, test_path, tests, property_order=None, boolean_properties=None): expected_manifest = manifestupdate.get_manifest(metadata_path, test_path, url_base, property_order=property_order, boolean_properties=boolean_properties) if expected_manifest is None: return # Remove expected data for tests that no longer exist for test in expected_manifest.iterchildren(): if test.id not in tests: test.remove() return expected_manifest
def load_expected(metadata_path, test_path, tests): expected_manifest = manifestupdate.get_manifest(metadata_path, test_path) if expected_manifest is None: return tests_by_id = {item.id: item for item in tests} # Remove expected data for tests that no longer exist for test in expected_manifest.iterchildren(): if not test.id in tests_by_id: test.remove() # Add tests that don't have expected data for test in tests: if not expected_manifest.has_test(test.id): expected_manifest.append(manifestupdate.TestNode.create(test.item_type, test.id)) return expected_manifest
def load_expected(test_manifest, metadata_path, test_path, tests, property_order=None, boolean_properties=None): expected_manifest = manifestupdate.get_manifest(metadata_path, test_path, test_manifest.url_base, property_order=property_order, boolean_properties=boolean_properties) if expected_manifest is None: return tests_by_id = {item.id: item for item in tests} # Remove expected data for tests that no longer exist for test in expected_manifest.iterchildren(): if test.id not in tests_by_id: test.remove() # Add tests that don't have expected data for test in tests: if not expected_manifest.has_test(test.id): expected_manifest.append(manifestupdate.TestNode.create(test.id)) return expected_manifest