예제 #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)
예제 #2
0
 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)
예제 #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)
예제 #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)
예제 #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)