diff options
| author | buck <buck@yelp.com> | 2013-10-14 18:53:30 -0700 |
|---|---|---|
| committer | buck <buck@yelp.com> | 2013-10-14 18:53:30 -0700 |
| commit | 8306c06eb9c9137d91e716094f36739ddd86e031 (patch) | |
| tree | daaba1cccaa13e4bd73b6cea75379494bb0f6643 | |
| parent | 0de91114002243d208110211258b7fc7dd47ea72 (diff) | |
| download | pylint-8306c06eb9c9137d91e716094f36739ddd86e031.tar.gz | |
A regression test for namedtuple attributes.
Currently broken under astroid on pyPI (1.0.0),
but works for hg tip atroid (9cf54b49a2d4).
| -rw-r--r-- | test/input/func_namedtuple.py | 10 | ||||
| -rw-r--r-- | test/messages/func_namedtuple.txt | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/input/func_namedtuple.py b/test/input/func_namedtuple.py new file mode 100644 index 0000000..8cfd048 --- /dev/null +++ b/test/input/func_namedtuple.py @@ -0,0 +1,10 @@ +"""Test namedtuple attributes. + +Regression test for: +https://bitbucket.org/logilab/pylint/issue/93/pylint-crashes-on-namedtuple-attribute +""" +__revision__ = None + +from collections import namedtuple +Thing = namedtuple('Thing', ()) +print Thing.x diff --git a/test/messages/func_namedtuple.txt b/test/messages/func_namedtuple.txt new file mode 100644 index 0000000..d1ef2b1 --- /dev/null +++ b/test/messages/func_namedtuple.txt @@ -0,0 +1 @@ +E: 10: Class 'Thing' has no 'x' member |
