[New-bugs-announce] [issue30055] Missed testcleanup in decimal.rst

Marco Buttu report at bugs.python.org
Wed Apr 12 10:59:31 EDT 2017


New submission from Marco Buttu:

The testsetup in Doc/library/decimal.rst is not enough for isolating the tests in respect to the other rst files.  Currently we have the following testsetup, without a testcleanup:

 .. testsetup:: *
 
    import decimal
    import math
    from decimal import *
    # make sure each group gets a fresh context
    setcontext(Context())

Without a testcleanup, the changes on the context will affect the other files that use the context (like Doc/library/statistics.rst).  We should better isolate the tests adding also a testcleanup:

.. testcleanup:: *

   # make sure other tests (outside this file) get a fresh context
   setcontext(Context())

I am opening a PR.

----------
assignee: docs at python
components: Documentation
messages: 291559
nosy: docs at python, marco.buttu, skrah
priority: normal
severity: normal
status: open
title: Missed testcleanup in decimal.rst
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30055>
_______________________________________


More information about the New-bugs-announce mailing list