Skip to content

Commit

Permalink
Update tests for docstring dedenting in Python 3.13
Browse files Browse the repository at this point in the history
Update the `get_expected()` function to account for the fact that
Python 3.13 automatically dedents all the docstrings, and therefore
does not require explicitly removing the indent (which effectively
removes too much indent).

Fixes #199
  • Loading branch information
mgorny committed Aug 3, 2024
1 parent 30da370 commit 58f7d7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_svg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

import dominate.svg
from dominate.tags import *
from dominate.svg import *
Expand All @@ -14,7 +16,10 @@ def base():


def get_expected(func):
return func.__doc__.replace('\n ', '\n').strip()
doc = func.__doc__
if sys.version_info < (3, 13):
doc = doc.replace('\n ', '\n')
return doc.strip()


def output_test(func):
Expand Down

0 comments on commit 58f7d7f

Please sign in to comment.