# HG changeset patch # User Paul Boddie # Date 1338676965 -7200 # Node ID b0f8c2d66579a2389eb4d3c4e81b806d144834e6 # Parent e43264ed5c5d7ec130d5770f0a23158123573730 Added class attribute/method test. diff -r e43264ed5c5d -r b0f8c2d66579 tests/attributes_class_copy_from_other.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/attributes_class_copy_from_other.py Sun Jun 03 00:42:45 2012 +0200 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +class C: + def method(self): + return 123 + +class D: + method = C.method # won't rebind to D + +c = C() +d = D() +result_123 = c.method() +result2_123 = d.method(c) # need D instance to function + +# vim: tabstop=4 expandtab shiftwidth=4