pycapnp/test/test_load.py

20 lines
428 B
Python
Raw Normal View History

2013-08-28 23:13:38 -07:00
import pytest
import capnp
import os
this_dir = os.path.dirname(__file__)
@pytest.fixture
def addressbook():
return capnp.load(os.path.join(this_dir, 'addressbook.capnp'))
def test_basic_load():
capnp.load(os.path.join(this_dir, 'addressbook.capnp'))
def test_constants(addressbook):
assert addressbook.qux == 123
def test_classes(addressbook):
assert addressbook.AddressBook
assert addressbook.Person