Skip to content

Instantly share code, notes, and snippets.

@frankhillard
Created November 25, 2019 12:48
Embed
What would you like to do?
example of catching exception with pytzeos
def test_increaseCounterBy_negative_value_should_throw_exception(self):
try:
# Given
    increase_value = -1
# When
    self.contract.increaseCounterBy(increase_value).result(storage=0)
except MichelsonRuntimeError as e:
# Then
    return self.assertTrue("value should be > 0" in str(e))
self.fail("This fail should not happen.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment