[David Abrahams] > In general, I can change my doctests to use assert rather than looking > for 1 or 0. If you want x-version doctests, you could change """ >>> boolean_expect_true 1 >>> boolean_expect_false 0 """ to, e.g., """ >>> boolean_expect_true and 1 1 >>> boolean_expect_false or 0 0 """ Then you won't get hosed by -O (as an assert would do). You may not run doctests with -O today, but the more -O does over time the more important it will become to do so. Right now running tests under -O mainly protects against logic errors introduced by hiding crucial parts of the code in "if __debug__:" blocks, and few people use __debug__ explicitly now.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4