1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/imported.py Sun Jun 22 02:21:39 2008 +0200
1.3 @@ -0,0 +1,6 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +attr = 123
1.7 +a = 10
1.8 +
1.9 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/importer.py Sun Jun 22 02:21:39 2008 +0200
2.3 @@ -0,0 +1,22 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +import imported
2.7 +
2.8 +imported.attr = 456 # detected with warning
2.9 +
2.10 +m = imported
2.11 +imported.a = 9 # detected with warning
2.12 +m.a = 8 # detected with warning (m is always imported)
2.13 +
2.14 +imported.x = 1 # detected with warning (despite no collision)
2.15 +
2.16 +class C: # hack: make an attribute called y known to the system
2.17 + y = None # hack: this prevents compilation errors with the statements
2.18 + # hack: below
2.19 +
2.20 +n = None
2.21 +n = imported
2.22 +n.y = 2 # not detected due to reassignment of n
2.23 +n.y = 3 # not detected due to reassignment of n
2.24 +
2.25 +# vim: tabstop=4 expandtab shiftwidth=4