1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/importer.py Sun Jun 22 02:21:39 2008 +0200
1.3 @@ -0,0 +1,22 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +import imported
1.7 +
1.8 +imported.attr = 456 # detected with warning
1.9 +
1.10 +m = imported
1.11 +imported.a = 9 # detected with warning
1.12 +m.a = 8 # detected with warning (m is always imported)
1.13 +
1.14 +imported.x = 1 # detected with warning (despite no collision)
1.15 +
1.16 +class C: # hack: make an attribute called y known to the system
1.17 + y = None # hack: this prevents compilation errors with the statements
1.18 + # hack: below
1.19 +
1.20 +n = None
1.21 +n = imported
1.22 +n.y = 2 # not detected due to reassignment of n
1.23 +n.y = 3 # not detected due to reassignment of n
1.24 +
1.25 +# vim: tabstop=4 expandtab shiftwidth=4