def check_pom(test, pom, org_name, artifact_name, version, dependencies):
    contents = pom.read().decode('utf-8')
    def gen_coordinate_regex(org, artifact, v):
        regex = """<groupId>\\s*%s\\s*<\\/groupId>\\s*""" % org
        regex += """<artifactId>\\s*%s\\s*<\\/artifactId>\\s*""" % artifact
        regex += """<version>\\s*%s\\s*<\\/version>""" % v
        return regex
    main = gen_coordinate_regex(org_name, artifact_name, version)
    test.assertTrue(len(re.findall(main, contents)) == 1)
    for dep_org, dep_art, dep_version in dependencies:
        dep = gen_coordinate_regex(dep_org, dep_art, dep_version)
        test.assertTrue(len(re.findall(dep, contents)) == 1)
    pom.close()
Check the contents of the pom. Make sure the groupId, artifactId, and version are properly set.
dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/tests.py/check_pom