A function with some random output. Normal examples are verified as usual: >>> 1+3 4 But if you put '# random' in the output, it is ignored: >>> 1+3 junk goes here... # random >>> 1+2 again, anything goes #random if multiline, the r
()
| 73 | |
| 74 | |
| 75 | def ranfunc(): |
| 76 | """A function with some random output. |
| 77 | |
| 78 | Normal examples are verified as usual: |
| 79 | >>> 1+3 |
| 80 | 4 |
| 81 | |
| 82 | But if you put '# random' in the output, it is ignored: |
| 83 | >>> 1+3 |
| 84 | junk goes here... # random |
| 85 | |
| 86 | >>> 1+2 |
| 87 | again, anything goes #random |
| 88 | if multiline, the random mark is only needed once. |
| 89 | |
| 90 | >>> 1+2 |
| 91 | You can also put the random marker at the end: |
| 92 | # random |
| 93 | |
| 94 | >>> 1+2 |
| 95 | # random |
| 96 | .. or at the beginning. |
| 97 | |
| 98 | More correct input is properly verified: |
| 99 | >>> ranfunc() |
| 100 | 'ranfunc' |
| 101 | """ |
| 102 | return 'ranfunc' |
| 103 | |
| 104 | |
| 105 | def random_all(): |
nothing calls this directly
no outgoing calls
no test coverage detected