Skip to content

Convert assertions to if+raise#18

Merged
kkroening merged 1 commit into
kkroening:masterfrom
depau-forks:assert-remove
Jul 2, 2017
Merged

Convert assertions to if+raise#18
kkroening merged 1 commit into
kkroening:masterfrom
depau-forks:assert-remove

Conversation

@depau

@depau depau commented Jun 30, 2017

Copy link
Copy Markdown
Collaborator

Assertions are ignored if the interpreter is run with the -O (optimize).

I converted all assertions outside of tests to normal exceptions.

Please review the type of the exceptions (maybe we could define some new, module-specific ones), I tried to use the most meaningful ones (basically all ValueError and one RuntimeError).

@kkroening

Copy link
Copy Markdown
Owner

Oh I just saw this. Nice work!

Thanks @Depaulicious

@kkroening kkroening merged commit 89f9153 into kkroening:master Jul 2, 2017
kkroening added a commit that referenced this pull request Jul 5, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 6, 2017
kkroening added a commit that referenced this pull request Jul 12, 2017
@kkroening kkroening mentioned this pull request Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants