Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctest.DocTestSuite does not support __test__ #38859

Closed
rhettinger opened this issue Jul 16, 2003 · 3 comments
Closed

doctest.DocTestSuite does not support __test__ #38859

rhettinger opened this issue Jul 16, 2003 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@rhettinger
Copy link
Contributor

BPO 772091
Nosy @tim-one, @rhettinger

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tim-one'
closed_at = <Date 2004-08-07.05:42:01.000>
created_at = <Date 2003-07-16.05:04:47.000>
labels = ['library']
title = 'doctest.DocTestSuite does not support __test__'
updated_at = <Date 2004-08-07.05:42:01.000>
user = 'https://github.com/rhettinger'

bugs.python.org fields:

activity = <Date 2004-08-07.05:42:01.000>
actor = 'tim.peters'
assignee = 'tim.peters'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-07-16.05:04:47.000>
creator = 'rhettinger'
dependencies = []
files = []
hgrepos = []
issue_num = 772091
keywords = []
message_count = 3.0
messages = ['17069', '17070', '17071']
nosy_count = 2.0
nosy_names = ['tim.peters', 'rhettinger']
pr_nums = []
priority = 'low'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue772091'
versions = ['Python 2.4']

@rhettinger
Copy link
Contributor Author

The DocTestSuite tool ignores a module level dictionary
named __test__. This limits its usefulness for the
current python testsuite.

@rhettinger rhettinger added the stdlib Python modules in the Lib dir label Jul 16, 2003
@rhettinger rhettinger added the stdlib Python modules in the Lib dir label Jul 16, 2003
@rhettinger
Copy link
Contributor Author

Logged In: YES
user_id=80475

Perhaps this can be incorporated in your updates.

@tim-one
Copy link
Member

tim-one commented Aug 7, 2004

Logged In: YES
user_id=31435

Thanks for pointing it out! This got fixed by magic as part of
the refactoring -- doctest's unittest support used to have its
own code for finding things to test, entirely distinct from the
test-finding code used by the rest of doctest. Everything
uses a new common DocTestFinder class now, so there
should be no more differences in what the various wrappers
find to test.

I added a test to ensure that DocTestSuite does indeed make
tests from a __test__ dict (if present).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants