Пример #1
0
def test_add_import_hook():
    capnp.add_import_hook([this_dir])

    # Make sure any previous imports of addressbook_capnp are gone
    capnp.cleanup_global_schema_parser()

    import addressbook_capnp
    addressbook_capnp.AddressBook.new_message()
Пример #2
0
def test_defualt_import_hook():
    # Make sure any previous imports of addressbook_capnp are gone
    capnp.cleanup_global_schema_parser()

    import addressbook_capnp  # noqa: F401
Пример #3
0
def capability():
    capnp.cleanup_global_schema_parser()
    return capnp.load(os.path.join(this_dir, 'test_capability.capnp'))