Fix for upstream changes in kj::Exception

* Change from using Nature/Durability to Type
* Prefer to raise KjException directly instead of Value/RuntimError.
* Will still raise AttributeError appropriately.
This commit is contained in:
Jason Paryani
2014-11-30 14:27:10 -08:00
parent 42c0424e6e
commit b9c9c6bc5c
8 changed files with 171 additions and 175 deletions

View File

@@ -37,9 +37,9 @@ def test_which_builder(addressbook):
assert bob.employment.which == addressbook.Person.Employment.unemployed
assert bob.employment.which == "unemployed"
with pytest.raises(ValueError):
with pytest.raises(Exception):
addresses.which
with pytest.raises(ValueError):
with pytest.raises(Exception):
addresses.which
@@ -71,9 +71,9 @@ def test_which_reader(addressbook):
bob = people[1]
assert bob.employment.which == "unemployed"
with pytest.raises(ValueError):
with pytest.raises(Exception):
addresses.which
with pytest.raises(ValueError):
with pytest.raises(Exception):
addresses.which