diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2016-01-24 13:47:51 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2016-01-24 13:47:51 +0900 |
| commit | b1a23817fc6e880fb7ed6c5e873f70bf65e2272b (patch) | |
| tree | bc7fde90108744cc29e2397740530a699f5de02e /tests/roots/test-directive-code | |
| parent | 97db21453b41447b2e4613eb2fe77391cf9e00a5 (diff) | |
| parent | 6ef4bd3e1e5e1fef43642d6dc47ca5ecc785942f (diff) | |
| download | sphinx-git-b1a23817fc6e880fb7ed6c5e873f70bf65e2272b.tar.gz | |
Merge with 'stable'
Diffstat (limited to 'tests/roots/test-directive-code')
| -rw-r--r-- | tests/roots/test-directive-code/python.rst | 13 | ||||
| -rw-r--r-- | tests/roots/test-directive-code/target.py | 22 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/roots/test-directive-code/python.rst b/tests/roots/test-directive-code/python.rst new file mode 100644 index 000000000..794c190f1 --- /dev/null +++ b/tests/roots/test-directive-code/python.rst @@ -0,0 +1,13 @@ +===========================
+Literal Includes for python
+===========================
+
+block start with blank or comment
+=================================
+
+.. literalinclude:: target.py
+ :pyobject: block_start_with_comment
+
+.. literalinclude:: target.py
+ :pyobject: block_start_with_blank
+
diff --git a/tests/roots/test-directive-code/target.py b/tests/roots/test-directive-code/target.py new file mode 100644 index 000000000..61ad717ec --- /dev/null +++ b/tests/roots/test-directive-code/target.py @@ -0,0 +1,22 @@ +# Literally included file using Python highlighting +# -*- coding: utf-8 -*- + +foo = "Including Unicode characters: üöä" + +class Foo: + pass + +class Bar: + def baz(): + pass + +# comment after Bar class definition +def bar(): pass + +def block_start_with_comment(): + # Comment + return 1 + +def block_start_with_blank(): + + return 1 |
