| @@ 35-58 (lines=24) @@ | ||
| 32 | ||
| 33 | # These "asserts" using only for self-checking and not necessary for |
|
| 34 | # auto-testing |
|
| 35 | if __name__ == '__main__': |
|
| 36 | assert ( |
|
| 37 | checkio( |
|
| 38 | u"""DREAMING of apples on a wall, |
|
| 39 | And dreaming often, dear, |
|
| 40 | I dreamed that, if I counted all, |
|
| 41 | -How many would appear?""", |
|
| 42 | u"ten", |
|
| 43 | ) |
|
| 44 | == [2, 14, 2, 16] |
|
| 45 | ) |
|
| 46 | assert ( |
|
| 47 | checkio( |
|
| 48 | u"""He took his vorpal sword in hand: |
|
| 49 | Long time the manxome foe he sought-- |
|
| 50 | So rested he by the Tumtum tree, |
|
| 51 | And stood awhile in thought. |
|
| 52 | And as in uffish thought he stood, |
|
| 53 | The Jabberwock, with eyes of flame, |
|
| 54 | Came whiffling through the tulgey wood, |
|
| 55 | And burbled as it came!""", |
|
| 56 | u"noir", |
|
| 57 | ) |
|
| 58 | == [4, 16, 7, 16] |
|
| 59 | ) |
|
| 60 | ||
| @@ 33-44 (lines=12) @@ | ||
| 30 | ||
| 31 | # These "asserts" using only for self-checking and not necessary for |
|
| 32 | # auto-testing |
|
| 33 | if __name__ == '__main__': # pragma: no cover |
|
| 34 | assert ( |
|
| 35 | checkio(["172.16.12.0", "172.16.13.0", "172.16.14.0", "172.16.15.0"]) |
|
| 36 | == "172.16.12.0/22" |
|
| 37 | ), "First Test" |
|
| 38 | assert ( |
|
| 39 | checkio(["172.16.12.0", "172.16.13.0", "172.155.43.9"]) == "172.0.0.0/8" |
|
| 40 | ), "Second Test" |
|
| 41 | assert ( |
|
| 42 | checkio(["172.16.12.0", "172.16.13.0", "172.155.43.9", "146.11.2.2"]) |
|
| 43 | == "128.0.0.0/2" |
|
| 44 | ), "Third Test" |
|
| 45 | ||