# HG changeset patch # User Paul Boddie # Date 1474574917 -7200 # Node ID be69c5dc27abec24d6549ec35dc26e6c36cac57b # Parent 941d248687026f4b46430c0dcc1ca59a13d3b0dc Added another test of chained attributes. diff -r 941d24868702 -r be69c5dc27ab tests/chain.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/chain.py Thu Sep 22 22:08:37 2016 +0200 @@ -0,0 +1,23 @@ +class C: + class D: + class E: + def m(self, x): + return x + +def main(): + c = C + d = C.D + e = C.D.E + f = C.D.E.m + inst = e() + method = inst.m + return method(5) + +result1 = main() +c = C +d = C.D +e = C.D.E +f = C.D.E.m +inst = e() +method = inst.m +result2 = method(5)