Skip to content

Commit

Permalink
Fix tests to handle Python 3.13 stripping indents from docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
musicinmybrain committed Oct 30, 2023
1 parent b9f6a64 commit 857b656
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions parameterized/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,16 @@ def test_multiline_documentation(self, foo):
"""Documentation.
More"""
self._assert_docstring(
"Documentation [with foo=%r].\n\n"
" More" %(foo, )
)
if sys.version_info[:2] < (3, 13):
self._assert_docstring(
"Documentation [with foo=%r].\n\n"
" More" %(foo, )
)
else:
self._assert_docstring(
"Documentation [with foo=%r].\n\n"
"More" %(foo, )
)

@parameterized.expand([param("foo")])
def test_unicode_docstring(self, foo):
Expand Down

0 comments on commit 857b656

Please sign in to comment.