1.1 --- a/TO_DO.txt Sun May 01 00:37:51 2011 +0200
1.2 +++ b/TO_DO.txt Sun May 08 18:41:21 2011 +0200
1.3 @@ -1,3 +1,11 @@
1.4 +Dynamic Attribute Access
1.5 +========================
1.6 +
1.7 +Ensure that getattr (or other dynamic attribute usage) causes propagation of coverage to
1.8 +the potential attributes.
1.9 +
1.10 +Consider explicit accessor initialisation.
1.11 +
1.12 Attribute Usage
1.13 ===============
1.14
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/getattr_instance_methods.py Sun May 08 18:41:21 2011 +0200
2.3 @@ -0,0 +1,16 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +class C:
2.7 + def x(self):
2.8 + return 1
2.9 +
2.10 +class D:
2.11 + def x(self):
2.12 + return 2
2.13 +
2.14 +c = C()
2.15 +d = D()
2.16 +result_1 = getattr(c, "x")()
2.17 +result_2 = getattr(d, "x")()
2.18 +
2.19 +# vim: tabstop=4 expandtab shiftwidth=4