Skip to content

Commit

Permalink
Set doctest_global_cleanup sphinx directive
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Nov 6, 2023
1 parent c2ba7c1 commit 874c95b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,11 @@
('index', 'gmpy2', 'gmpy2 Documentation',
['Case Van Horsen'], 3)
]

# Python code that is treated like it were put in a testcleanup directive
# for *every* file that is tested, and for every group.
doctest_global_cleanup = """
import gmpy2
gmpy2.set_context(gmpy2.context())
"""

0 comments on commit 874c95b

Please sign in to comment.