def test_does_not_raise_exception_if_extension_is_not_defined(simple_resource): try: _load_and_merge_framework_definitions( framework_file_with_extension_only, simple_resource.config) except Exception: pytest.fail( "Extensions should be verified when filling defaults, not on initial load." )
def test_raises_exception_on_duplicate_definition(simple_resource): with pytest.raises(ValueError, match="Duplicate entry 'duplicate_entry' found."): _load_and_merge_framework_definitions(second_file_has_duplicate, simple_resource.config)
def test_loads_all_definitions(simple_resource): definition = _load_and_merge_framework_definitions(framework_file, simple_resource.config) assert "unit_test_framework" in definition assert len(definition) == 5
def test_merges_definitions_of_two_files(simple_resource): definition = _load_and_merge_framework_definitions( second_file_has_extension, simple_resource.config) assert "other_test_framework_extended_other_file" in definition assert len(definition) == 6
def test_loads_all_definitions(): definition = _load_and_merge_framework_definitions(framework_file) assert "unit_test_framework" in definition assert len(definition) == 5