Created
November 11, 2017 07:17
-
-
Save jaycody/0f3b83ffa52078f3747ef15655c439d6 to your computer and use it in GitHub Desktop.
Generator with next() for running next test. Yield?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## assuming function: test_check_this() | |
## Generator runs each test | |
T = [10, -10, 'h', [], {}, '', 1.0, None, check_this('16'), '\n'] | |
G = (test_check_this(test_val) for test_val in T) | |
for testable_item in T: | |
# run test on that testable_item | |
print next(G) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment