Skip to content

Commit

Permalink
Add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Jan 15, 2023
1 parent e98948a commit b94ac57
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/blacken_docs_test.py
@@ -1,5 +1,7 @@
from __future__ import annotations

from textwrap import dedent

import black

import blacken_docs
Expand Down Expand Up @@ -215,6 +217,23 @@ def test_format_src_rst_literal_blocks():
)


def test_format_src_rst_literal_blocks_nested():
before = dedent(
'''
* hello
.. warning::
don't hello too much
''',
)
after, errors = blacken_docs.format_str(
before, BLACK_MODE, rst_literal_blocks=True,
)
assert after == before
assert errors == []


def test_format_src_rst_sphinx_doctest():
before = (
'.. testsetup:: group1\n'
Expand Down

0 comments on commit b94ac57

Please sign in to comment.