Title: Missed testcleanup in decimal.rst
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: skrah Nosy List: docs@python, marco.buttu, skrah
Priority: normal Keywords:

Created on 2017-04-12 14:59 by marco.buttu, last changed 2017-04-13 12:23 by skrah. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1094 merged marco.buttu, 2017-04-12 15:11
Messages (5)
msg291559 - (view) Author: Marco Buttu (marco.buttu) * Date: 2017-04-12 14:59
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

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

I am opening a PR.
msg291601 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-04-13 11:30
New changeset 2c0b5c664ba7d36dc09788d3778d5b33e3fa1bd0 by Stefan Krah (Marco Buttu) in branch 'master':
bpo-30055: add testcleanup to leave a fresh context (#1094)
msg291603 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-04-13 11:35
Thanks, looks good.  (I hope GitHub runs the doctests at Travis CI, locally most of them failed so I didn't bother to run the tests for this one.)
msg291604 - (view) Author: Marco Buttu (marco.buttu) * Date: 2017-04-13 11:50
We are not executing the doctests on Travis CI, but I executed them locally.  That's why I realized there was a missed testcleanup.  The issue27200 wants to fix all doctests, and I actually completed the job, but three PRs are still opened, and I am waiting for review approval.  If you want to contribute to the reviews, look for 'bpo-27200' on the GitHub PRs.  I hope the doctest will be run on Travis as soon as possible.  Thanks, Marco
msg291606 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-04-13 12:23
Ok great, maybe I'll take a look.
Date User Action Args
2017-04-13 12:23:50skrahsetmessages: + msg291606
2017-04-13 11:50:16marco.buttusetmessages: + msg291604
2017-04-13 11:35:49skrahsetstatus: open -> closed
messages: + msg291603

assignee: docs@python -> skrah
resolution: fixed
stage: resolved
2017-04-13 11:30:27skrahsetmessages: + msg291601
2017-04-12 15:11:52marco.buttusetpull_requests: + pull_request1236
2017-04-12 14:59:31marco.buttucreate