Did I find the right examples for you? yes no

All Samples(9)  |  Call(0)  |  Derive(0)  |  Import(9)

src/p/y/pycapnp-HEAD/examples/addressbook.py   pycapnp(Download)
from __future__ import print_function
import os
import capnp
 
import addressbook_capnp

src/p/y/pycapnp-HEAD/test/test_load.py   pycapnp(Download)
def test_defualt_import_hook():
    import addressbook_capnp
 
def test_add_import_hook():
    capnp.add_import_hook([this_dir])
 
    import addressbook_capnp
    capnp.add_import_hook([this_dir])
 
    import addressbook_capnp
    addressbook_capnp.AddressBook.new_message()
 
 
    with pytest.raises(ImportError):
        import addressbook_capnp
 

src/p/y/pycapnp-0.4.4/test/test_load.py   pycapnp(Download)
def test_defualt_import_hook():
    import addressbook_capnp
 
def test_add_import_hook():
    capnp.add_import_hook([this_dir])
 
    import addressbook_capnp
    capnp.add_import_hook([this_dir])
 
    import addressbook_capnp
    addressbook_capnp.AddressBook.new_message()
 
 
    with pytest.raises(ImportError):
        import addressbook_capnp