def gen_and_comp_python(self, yaml_file: str, python_file: str, master_file: str) -> None:
cwd = os.path.abspath(os.path.dirname(__file__))<EOL>path = os.path.abspath(os.path.join(cwd, '<STR_LIT:..>', yaml_file))<EOL>targetdir = os.path.join(cwd, '<STR_LIT:target>')<EOL>os.makedirs(targetdir, exist_ok=True)<EOL>model_out = os.path.join(targetdir, python_file)<EOL>master_file_name = os.path.basename(master_file)<EOL>with open(model_out, '<STR_LIT:w>') as pyfile:<EOL><INDENT>pyfile.write(str(PythonGenerator(path).serialize()))<EOL><DEDENT>with open(model_out) as newf:<EOL><INDENT>newdat = metadata_filter(newf.read())<EOL>with open(master_file) as oldf:<EOL><INDENT>olddat = metadata_filter(oldf.read())<EOL>self.maxDiff = None<EOL>self.assertEqual(olddat, newdat, f'<STR_LIT>')<EOL><DEDENT><DEDENT>
Generate a new metamodel and verify that it matches what we used to build it