summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-12-29 18:38:06 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-12-29 18:38:06 +0000
commit5e794e5c4e6c8646e4ec1950135c956dcb314f78 (patch)
tree814ac3c8a3259705363ea090c052ef157d5e5900 /docutils/test
parentd9d3a693489e2555ce42a3e71c55663d5bcc7aff (diff)
downloaddocutils-5e794e5c4e6c8646e4ec1950135c956dcb314f78.tar.gz
updated
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1046 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rw-r--r--docutils/test/test_readers/test_python/test_parser.py39
1 files changed, 36 insertions, 3 deletions
diff --git a/docutils/test/test_readers/test_python/test_parser.py b/docutils/test/test_readers/test_python/test_parser.py
index 0626b1a88..ce70cc27c 100644
--- a/docutils/test/test_readers/test_python/test_parser.py
+++ b/docutils/test/test_readers/test_python/test_parser.py
@@ -383,11 +383,33 @@ a.b = 1
'''],
['''\
a[b] = 1
-"""This assignment is noted but ignored unless ``a`` is a function."""
+"""Subscript assignments are ignored."""
''',
'''\
<Module filename="test data">
'''],
+['''\
+a = foo(b=1)
+''',
+'''\
+<Module filename="test data">
+ <Attribute lineno="1" name="a">
+ <Expression lineno="1">
+ foo(b=1)
+'''],
+# ['''\
+# a = 1
+#
+# """Because of the blank above, this is a module docstring."""
+# ''',
+# '''\
+# <Module filename="test data">
+# <Attribute lineno="1" name="a">
+# <Expression lineno="1">
+# 1
+# <Docstring lineno="3">
+# Because of the blank above, this is a module docstring.
+# '''],
]
totest['def'] = [
@@ -581,7 +603,7 @@ class C:
['''\
class C:
def __init__(self):
- local = foo(a = 1)
+ local = foo(a=1)
''',
'''\
<Module filename="test data">
@@ -591,7 +613,7 @@ class C:
<Parameter lineno="2" name="self">
<Attribute lineno="3" name="local">
<Expression lineno="3">
- foo(a = 1)
+ foo(a=1)
'''],
]
@@ -610,6 +632,17 @@ del a
'''],
]
+totest['comments'] = [
+# ['''\
+# # Comment
+# ''',
+# '''\
+# <Module filename="test data">
+# <Comment lineno="1">
+# # Comment
+# '''],
+]
+
# @@@ no comments yet
totest['everything'] = [
['''\