summaryrefslogtreecommitdiff
path: root/tests/test_directive_code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-24 16:34:47 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-24 16:34:47 +0900
commit51d500833e391c182f536e83a5d62d5e90ce8ca9 (patch)
treefb854309b759773feb83e7e4bbc91e3ed3cb2b00 /tests/test_directive_code.py
parent375fb52fe402d46d633e321ce8f20c1aa61c49b9 (diff)
parent41ee2d6e6595d0eefb4a2b752fd79a3451382d5a (diff)
downloadsphinx-git-51d500833e391c182f536e83a5d62d5e90ce8ca9.tar.gz
Merge branch '3.x' into 7774_remove_develop.rst
Diffstat (limited to 'tests/test_directive_code.py')
-rw-r--r--tests/test_directive_code.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py
index eda331645..0ae11baf3 100644
--- a/tests/test_directive_code.py
+++ b/tests/test_directive_code.py
@@ -4,7 +4,7 @@
Test the code-block directive.
- :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -250,6 +250,14 @@ def test_LiteralIncludeReader_dedent(literal_inc_path):
" pass\n"
"\n")
+ # dedent: None
+ options = {'lines': '9-11', 'dedent': None}
+ reader = LiteralIncludeReader(literal_inc_path, options, DUMMY_CONFIG)
+ content, lines = reader.read()
+ assert content == ("def baz():\n"
+ " pass\n"
+ "\n")
+
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
def test_LiteralIncludeReader_tabwidth(testroot):