Exemple #1
0
 def test_metamodel_python(self):
     """ Build meta.py """
     env.generate_single_file(
         'meta.py',
         lambda: PythonGenerator(env.meta_yaml, importmap=env.import_map
                                 ).serialize(),
         value_is_returned=True,
         filtr=metadata_filter,
         comparator=compare_python,
         use_testing_root=True)
 def test_mapping_python(self):
     """ Build includes/mappings.py """
     env.generate_single_file(
         'includes/mappings.py',
         lambda: PythonGenerator(env.mapping_yaml, importmap=env.import_map
                                 ).serialize(),
         value_is_returned=True,
         filtr=metadata_filter,
         comparator=lambda exp, act: compare_python(
             exp, act, self.env.expected_path('includes/mappings.py')),
         use_testing_root=True)
Exemple #3
0
 def test_annotations_python(self):
     """ Build includes/annotations.py """
     env.generate_single_file(
         'includes/annotations.py',
         lambda: PythonGenerator(env.input_path('includes',
                                                'annotations.yaml'),
                                 importmap=env.import_map).serialize(),
         value_is_returned=True,
         filtr=metadata_filter,
         comparator=compare_python,
         use_testing_root=True)
Exemple #4
0
 def test_annotations_python(self):
     """ Build includes/annotations.py """
     env.generate_single_file(
         'annotations.py',
         lambda: PythonGenerator(LOCAL_ANNOTATIONS_YAML_FILE,
                                 importmap=env.import_map,
                                 genmeta=True).serialize(),
         value_is_returned=True,
         filtr=metadata_filter,
         comparator=lambda exp, act: compare_python(
             exp, act, self.env.expected_path('annotations.py')),
         use_testing_root=True)
Exemple #5
0
 def test_extensions_python(self):
     """ Build includes/extensions.py """
     env.generate_single_file(
         'includes/extensions.py',
         lambda: PythonGenerator(env.input_path('includes',
                                                'extensions.yaml'),
                                 importmap=env.import_map,
                                 genmeta=True).serialize(),
         value_is_returned=True,
         filtr=metadata_filter,
         comparator=lambda exp, act: compare_python(
             exp, act, self.env.expected_path('includes/extensions.py')),
         use_testing_root=True)