redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

accumulate: update `with_backtrace` to not rely on test `results` #273

Closed kellyredding closed 8 years ago

kellyredding commented 8 years ago

This is prep for no longer storing results on tests. We can't rely on a test knowing its results going forward. I already broke this method back in PR 269 b/c results are getting accumulated before this method could set the proper backtrace on them. This fixes the regression and preps for a test not knowing its results anymore.

Note: this does some cleanups to the __whatever__ variables/methods on the context. These weirdly named vars are needed by the context but we don't want to pollute the variable/method space b/c users will be defining their own variables/methods. I updated the handling of these just as cleanups and I added assert to each one's name to add extra protection against name collisions with user defined things.

See #269 for reference.

@jcredding ready for review.

jcredding commented 8 years ago

@kellyredding - Forgot about all of the __something__ variables. Changes look good :boom: