Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /Test/examples/towers_of_hanoi.tst [000000] .. [4dca5a] Maximize Restore

  Switch to unified view

a b/Test/examples/towers_of_hanoi.tst
1
# towers_of_hanoi.tst
2
3
    >>> import sys
4
    >>> import pyke
5
    >>> import os
6
    >>> new_path = os.path.join(os.path.dirname(os.path.dirname(pyke.__file__)),
7
    ...                         'examples/towers_of_hanoi')
8
    >>> sys.path.append(new_path)
9
10
    >>> import run
11
12
    >>> run.test(1)
13
    got 1: ((0, 2),)
14
15
    >>> run.test(2)
16
    got 1: ((0, 1), (0, 2), (1, 2))
17
    got 2: ((0, 2), (0, 1), (2, 0), (1, 2), (0, 2))
18
19
    >>> run.test(3)
20
    got 1: ((0, 1), (0, 2), (1, 0), (2, 1), (0, 1), (0, 2), (1, 0), (1, 2), (0, 2))
21
    got 2: ((0, 1), (0, 2), (1, 0), (2, 1), (0, 1), (0, 2), (1, 2), (1, 0), (2, 1), (0, 2), (1, 2))
22
    got 3: ((0, 1), (0, 2), (1, 2), (0, 1), (2, 0), (2, 1), (0, 2), (1, 0), (2, 0), (1, 2), (0, 1), (0, 2), (1, 2))
23
    got 4: ((0, 1), (0, 2), (1, 2), (0, 1), (2, 0), (2, 1), (0, 2), (1, 0), (2, 0), (1, 2), (0, 2), (0, 1), (2, 0), (1, 2), (0, 2))
24
    got 5: ((0, 1), (0, 2), (1, 2), (0, 1), (2, 1), (2, 0), (1, 0), (1, 2), (0, 1), (0, 2), (1, 2))
25
    got 6: ((0, 1), (0, 2), (1, 2), (0, 1), (2, 1), (2, 0), (1, 0), (1, 2), (0, 2), (0, 1), (2, 0), (1, 2), (0, 2))
26
    got 7: ((0, 2), (0, 1), (2, 0), (1, 2), (0, 2), (0, 1), (2, 0), (2, 1), (0, 2), (1, 0), (2, 0), (1, 2), (0, 1), (0, 2), (1, 2))
27
    got 8: ((0, 2), (0, 1), (2, 0), (1, 2), (0, 2), (0, 1), (2, 0), (2, 1), (0, 2), (1, 0), (2, 0), (1, 2), (0, 2), (0, 1), (2, 0), (1, 2), (0, 2))
28
    got 9: ((0, 2), (0, 1), (2, 0), (1, 2), (0, 2), (0, 1), (2, 1), (2, 0), (1, 0), (1, 2), (0, 1), (0, 2), (1, 2))
29
    got 10: ((0, 2), (0, 1), (2, 0), (1, 2), (0, 2), (0, 1), (2, 1), (2, 0), (1, 0), (1, 2), (0, 2), (0, 1), (2, 0), (1, 2), (0, 2))
30
    got 11: ((0, 2), (0, 1), (2, 1), (0, 2), (1, 0), (1, 2), (0, 2))
31
    got 12: ((0, 2), (0, 1), (2, 1), (0, 2), (1, 2), (1, 0), (2, 1), (0, 2), (1, 2))
32