# HG changeset patch # User Paul Boddie # Date 1214094099 -7200 # Node ID 2300627a338d2bca8b9387c4b04abfe504e49575 # Parent 5e9482ffb9a78f29bd2f8fdaad8517b98982a0bd Added missing module attribute test files. diff -r 5e9482ffb9a7 -r 2300627a338d tests/imported.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/imported.py Sun Jun 22 02:21:39 2008 +0200 @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +attr = 123 +a = 10 + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r 5e9482ffb9a7 -r 2300627a338d tests/importer.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/importer.py Sun Jun 22 02:21:39 2008 +0200 @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +import imported + +imported.attr = 456 # detected with warning + +m = imported +imported.a = 9 # detected with warning +m.a = 8 # detected with warning (m is always imported) + +imported.x = 1 # detected with warning (despite no collision) + +class C: # hack: make an attribute called y known to the system + y = None # hack: this prevents compilation errors with the statements + # hack: below + +n = None +n = imported +n.y = 2 # not detected due to reassignment of n +n.y = 3 # not detected due to reassignment of n + +# vim: tabstop=4 expandtab shiftwidth=4