algorand / graviton

🧑‍🔬 verify your TEAL program by experiment and observation
MIT License
17 stars 8 forks source link

Better error messages for `DryRunInspector.from_single_response()` #12

Closed tzaffi closed 2 years ago

tzaffi commented 2 years ago

First Real Unit Test

@algoidurovic pointed out the following confusing error that he encountered while using graviton for a test (cv. this pyteal commit):

require exactly 1 dry run transaction to create a singleton but had 0 instead

This PR will first check the existence of "error" in the dry-run response, and pass that through when encountered.

Additionally: Discarding the former sanity_test.py which was just a stub in favor or inspector_test.py

algoidurovic commented 2 years ago

Was this tested with the commit you linked to? If so, what was the error message?

tzaffi commented 2 years ago

Was this tested with the commit you linked to? If so, what was the error message?

I ran the commit of pyteal referenced above, capturing this dryrun response that I then created the unit test out of.