components/python/decorator/test/results-2.7-32.master
author Rich Burridge <rich.burridge@oracle.com>
Tue, 20 Sep 2016 08:43:49 -0700
changeset 6934 e72eb275185d
parent 5028 db8ff415ba49
permissions -rw-r--r--
23093759 Upgrade decorator to 4.0.10
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
     1
test (__main__.DocumentationTestCase) ... Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
     2
    from decorator import getargspec  # akin to inspect.getargspec
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
     6
    print(getargspec(f1))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
     8
    ArgSpec(args=[], varargs='args', varkw='kw', defaults=None)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    11
    f1(0, 1) # doctest: +IGNORE_EXCEPTION_DETAIL
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
    Traceback (most recent call last):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
       ...
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    15
    TypeError: f1() takes exactly 1 positional argument (2 given)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    18
    from decorator import decorate
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
    @memoize
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
    def heavy_computation():
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
        time.sleep(2)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
        return "done"
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    29
    print(heavy_computation()) # the first time it will take 2 seconds
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
    done
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    34
    print(heavy_computation()) # the second time it will be instantaneous
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
    done
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    39
    print(getargspec(heavy_computation))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    41
    ArgSpec(args=[], varargs=None, varkw=None, defaults=None)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
    @trace
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
    def f1(x):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
        pass
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
    f1(0)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
    calling f1 with args (0,), {}
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    55
    print(getargspec(f1))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    56
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    57
    ArgSpec(args=['x'], varargs=None, varkw=None, defaults=None)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
    @trace
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
    def f(x, y=1, z=2, *args, **kw):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
        pass
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    63
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    64
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    66
    f(0, 3)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    67
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    68
    calling f with args (0, 3, 2), {}
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    69
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    70
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    71
    print(getargspec(f))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    72
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    73
    ArgSpec(args=['x', 'y', 'z'], varargs='args', varkw='kw', defaults=(1, 2))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    74
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    75
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    76
    from decorator import decorator
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    77
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    78
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    79
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    80
    print(decorator.__doc__)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    81
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    82
    decorator(caller) converts a caller function into a decorator
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    83
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    84
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    85
    @decorator
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    86
    def trace(f, *args, **kw):
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    87
        kwstr = ', '.join('%r: %r' % (k, kw[k]) for k in sorted(kw))
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
    88
        print("calling %s with args %s, {%s}" % (f.__name__, args, kwstr))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    89
        return f(*args, **kw)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    90
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    91
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    92
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    93
    trace # doctest: +ELLIPSIS
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    94
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    95
    <function trace at 0x...>
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    96
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    97
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    98
    @trace
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    99
    def func(): pass
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   100
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   101
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   102
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   103
    func()
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   104
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   105
    calling func with args (), {}
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   106
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   107
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   108
    @blocking("Please wait ...")
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   109
    def read_data():
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   110
        time.sleep(3) # simulate a blocking resource
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   111
        return "some data"
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   112
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   113
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   114
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   115
    print(read_data())  # data is not available yet
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   116
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   117
    Please wait ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   118
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   119
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   120
    time.sleep(1)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   121
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   122
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   123
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   124
    print(read_data())  # data is not available yet
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   125
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   126
    Please wait ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   127
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   128
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   129
    time.sleep(1)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   130
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   131
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   132
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   133
    print(read_data())  # data is not available yet
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   134
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   135
    Please wait ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   136
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   137
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   138
    time.sleep(1.1)  # after 3.1 seconds, data is available
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   139
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   140
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   141
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   142
    print(read_data())
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   143
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   144
    some data
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   145
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   146
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   147
    @decorator(Future)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   148
    def long_running(x):
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   149
        time.sleep(.5)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   150
        return x
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   151
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   152
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   153
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   154
    fut1 = long_running(1)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   155
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   156
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   157
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   158
    fut2 = long_running(2)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   159
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   160
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   161
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   162
    fut1.result() + fut2.result()
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   163
Expecting:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   164
    3
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   165
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   166
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   167
    from contextlib import contextmanager
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   168
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   169
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   170
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   171
    @contextmanager
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   172
    def before_after(before, after):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   173
        print(before)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   174
        yield
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   175
        print(after)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   176
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   177
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   178
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   179
    with before_after('BEFORE', 'AFTER'):
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   180
        print('hello')
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   181
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   182
    BEFORE
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   183
    hello
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   184
    AFTER
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   185
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   186
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   187
    def f(*args, **kw): # a function with a generic signature
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   188
        print(args, kw)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   189
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   190
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   191
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   192
    f1 = FunctionMaker.create('f1(a, b)', 'f(a, b)', dict(f=f))
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   193
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   194
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   195
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   196
    f1(1,2)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   197
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   198
    (1, 2) {}
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   199
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   200
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   201
    f1 = FunctionMaker.create(
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   202
        'f1(a, b)', 'f(a, b)', dict(f=f), addsource=True)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   203
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   204
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   205
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   206
    print(f1.__source__)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   207
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   208
    def f1(a, b):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   209
        f(a, b)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   210
    <BLANKLINE>
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   211
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   212
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   213
    f1 = FunctionMaker.create(
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   214
        'f1(a, b)', 'f(a, b)', dict(f=f), addsource=True, defaults=(None,))
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   215
Expecting nothing
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   216
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   217
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   218
    print(getargspec(f1))
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   219
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   220
    ArgSpec(args=['a', 'b'], varargs=None, varkw=None, defaults=(None,))
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   221
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   222
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   223
    import inspect
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   224
Expecting nothing
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   225
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   226
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   227
    print(inspect.getsource(example))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   228
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   229
        def wrapper(*args, **kw):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   230
            return func(*args, **kw)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   231
    <BLANKLINE>
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   232
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   233
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   234
    print(inspect.getsource(factorial.__wrapped__))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   235
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   236
    @tail_recursive
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   237
    def factorial(n, acc=1):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   238
        "The good old factorial"
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   239
        if n == 0:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   240
            return acc
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   241
        return factorial(n-1, n*acc)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   242
    <BLANKLINE>
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   243
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   244
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   245
    print(factorial(4))
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   246
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   247
    24
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   248
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   249
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   250
    writer = XMLWriter()
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   251
Expecting nothing
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   252
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   253
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   254
    writer.write(2.3)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   255
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   256
    '<float>2.3</float>'
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   257
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   258
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   259
    win(Paper(), Rock())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   260
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   261
    1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   262
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   263
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   264
    win(Scissors(), Paper())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   265
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   266
    1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   267
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   268
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   269
    win(Rock(), Scissors())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   270
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   271
    1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   272
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   273
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   274
    win(Paper(), Paper())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   275
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   276
    0
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   277
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   278
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   279
    win(Rock(), Rock())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   280
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   281
    0
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   282
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   283
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   284
    win(Scissors(), Scissors())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   285
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   286
    0
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   287
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   288
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   289
    win(Rock(), Paper())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   290
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   291
    -1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   292
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   293
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   294
    win(Paper(), Scissors())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   295
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   296
    -1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   297
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   298
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   299
    win(Scissors(), Rock())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   300
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   301
    -1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   302
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   303
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   304
    win(StrongRock(), Scissors())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   305
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   306
    1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   307
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   308
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   309
    win.dispatch_info(StrongRock, Scissors)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   310
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   311
    [('StrongRock', 'Scissors'), ('Rock', 'Scissors')]
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   312
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   313
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   314
    issubclass(WithLength, collections.Sized)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   315
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   316
    True
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   317
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   318
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   319
    get_length(WithLength())
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   320
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   321
    0
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   322
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   323
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   324
    _ = collections.Set.register(SomeSet)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   325
Expecting nothing
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   326
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   327
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   328
    issubclass(SomeSet, collections.Set)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   329
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   330
    True
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   331
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   332
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   333
    get_length(SomeSet())  # NB: the implementation for Sized would give 0
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   334
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   335
    1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   336
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   337
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   338
    g, V = singledispatch_example2()
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   339
Expecting nothing
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   340
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   341
Trying:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   342
    g.dispatch_info(V)
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   343
Expecting:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   344
    [('V',), ('Sized',), ('S',), ('Container',)]
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   345
ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   346
Trying:
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   347
    @trace
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   348
    def f():
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   349
        1/0
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   350
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   351
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   352
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   353
    f() # doctest: +ELLIPSIS
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   354
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   355
    Traceback (most recent call last):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   356
      ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   357
         File "<string>", line 2, in f
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   358
         File "<doctest __main__[22]>", line 4, in trace
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   359
           return f(*args, **kw)
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   360
         File "<doctest __main__[51]>", line 3, in f
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   361
           1/0
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   362
    ZeroDivisionError: ...
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   363
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   364
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   365
    @memoize
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   366
    def getkeys(**kw):
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   367
        return kw.keys()
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   368
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   369
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   370
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   371
    getkeys(func='a') # doctest: +ELLIPSIS
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   372
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   373
    Traceback (most recent call last):
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   374
     ...
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   375
    TypeError: _memoize() got multiple values for ... 'func'
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   376
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   377
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   378
    @trace
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   379
    def f(_func_): print(f)
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   380
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   381
    Traceback (most recent call last):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   382
      ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   383
    NameError: _func_ is overridden in
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   384
    def f(_func_):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   385
        return _call_(_func_, _func_)
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   386
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   387
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   388
    def f(): pass # the original function
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   389
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   390
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   391
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   392
    f.attr1 = "something" # setting an attribute
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   393
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   394
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   395
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   396
    f.attr2 = "something else" # setting another attribute
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   397
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   398
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   399
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   400
    traced_f = trace(f) # the decorated function
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   401
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   402
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   403
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   404
    traced_f.attr1
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   405
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   406
    'something'
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   407
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   408
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   409
    traced_f.attr2 = "something different" # setting attr
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   410
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   411
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   412
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   413
    f.attr2 # the original attribute did not change
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   414
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   415
    'something else'
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   416
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   417
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   418
    a = Action()
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   419
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   420
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   421
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   422
    a.view() # ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   423
Expecting nothing
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   424
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   425
Trying:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   426
    a.insert() # doctest: +IGNORE_EXCEPTION_DETAIL
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   427
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   428
    Traceback (most recent call last):
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   429
       ...
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   430
    PermissionError: User does not have the permission to run insert!
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   431
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   432
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   433
    decorator(_memoize).__name__
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   434
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   435
    '_memoize'
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   436
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   437
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   438
    factorial.__doc__
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   439
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   440
    'The good old factorial'
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   441
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   442
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   443
    ba.__class__.__name__
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   444
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   445
    'ContextManager'
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   446
ok
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   447
Trying:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   448
    hello('michele')
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   449
Expecting:
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   450
    BEFORE
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   451
    hello michele
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   452
    AFTER
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   453
ok
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   454
52 items had no tests:
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   455
    documentation.Action.delete
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   456
    documentation.Action.insert
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   457
    documentation.Action.view
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   458
    documentation.Admin
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   459
    documentation.C
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   460
    documentation.Future
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   461
    documentation.Future.__init__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   462
    documentation.Future.result
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   463
    documentation.Paper
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   464
    documentation.PermissionError
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   465
    documentation.PowerUser
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   466
    documentation.Rock
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   467
    documentation.Scissors
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   468
    documentation.SomeSet
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   469
    documentation.SomeSet.__len__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   470
    documentation.StrongRock
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   471
    documentation.TailRecursive
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   472
    documentation.TailRecursive.__call__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   473
    documentation.TailRecursive.__init__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   474
    documentation.User
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   475
    documentation.WithLength
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   476
    documentation.WithLength.__len__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   477
    documentation.XMLWriter
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   478
    documentation.XMLWriter.__init__
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   479
    documentation.XMLWriter.write
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   480
    documentation._memoize
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   481
    documentation._trace
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   482
    documentation.before_after
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   483
    documentation.blocking
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   484
    documentation.decorator_apply
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   485
    documentation.example
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   486
    documentation.f1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   487
    documentation.fact
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   488
    documentation.factorial
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   489
    documentation.get_length
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   490
    documentation.get_length_set
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   491
    documentation.get_length_sized
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   492
    documentation.get_userclass
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   493
    documentation.identity_dec
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   494
    documentation.memoize
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   495
    documentation.memoize_uw
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   496
    documentation.restricted
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   497
    documentation.singledispatch_example1
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   498
    documentation.singledispatch_example2
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   499
    documentation.tail_recursive
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   500
    documentation.trace
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   501
    documentation.win
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   502
    documentation.winPaperScissors
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   503
    documentation.winRockPaper
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   504
    documentation.winRockScissors
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   505
    documentation.winStrongRockPaper
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   506
    documentation.writefloat
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   507
4 items passed all tests:
6934
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   508
  78 tests in documentation
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   509
   3 tests in documentation.Action
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   510
   2 tests in documentation.a_test_for_pylons
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   511
   2 tests in documentation.hello
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   512
85 teok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   513
test_singledispatch1 (__main__.DocumentationTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   514
test_singledispatch2 (__main__.DocumentationTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   515
test_no_first_arg (__main__.ExtraTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   516
test_qualname (__main__.ExtraTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   517
test_signature (__main__.ExtraTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   518
test_unique_filenames (__main__.ExtraTestCase) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   519
test_c_classes (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   520
test_mro (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   521
test_mro_conflicts (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   522
test_register_abc (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   523
test_register_decorator (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   524
test_register_error (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   525
test_simple_overloads (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   526
test_wrapping_attributes (__main__.TestSingleDispatch) ... ok
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   527
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   528
----------------------------------------------------------------------
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   529
Ran 15 tests in
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   530
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   531
OK
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   532
sts in 56 items.
e72eb275185d 23093759 Upgrade decorator to 4.0.10
Rich Burridge <rich.burridge@oracle.com>
parents: 5028
diff changeset
   533
85 passed and 0 failed.
3840
39959a8e7a76 20460239 decorator should have some master test results to compare against
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   534
Test passed.