Overload of while_stmt that executes a Python while loop.
(test, body, get_state, set_state, init_vars, opts)
| 835 | |
| 836 | |
| 837 | def _py_while_stmt(test, body, get_state, set_state, init_vars, opts): |
| 838 | """Overload of while_stmt that executes a Python while loop.""" |
| 839 | del opts, get_state, set_state |
| 840 | |
| 841 | if __debug__: |
| 842 | checker = _PythonLoopChecker() |
| 843 | |
| 844 | loop_vars = init_vars |
| 845 | while test(*loop_vars): |
| 846 | |
| 847 | if __debug__: |
| 848 | checker.before_iteration() |
| 849 | |
| 850 | loop_vars = body(*loop_vars) |
| 851 | |
| 852 | if __debug__: |
| 853 | checker.after_iteration() |
| 854 | |
| 855 | return loop_vars |
| 856 | |
| 857 | |
| 858 | def if_stmt(cond, |
no test coverage detected