Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue26641

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:doctest doesn't support packages
Type:enhancementStage:
Components:Library (Lib)Versions:Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: brett.cannon, eric.snow, ncoghlan, python-dev, vstinner
Priority:normalKeywords:patch

Created on2016-03-25 12:00 byvstinner, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
doctest_package.patchvstinner,2016-03-25 12:00review
Messages (3)
msg262429 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2016-03-25 12:00
ThePEP 420 -- Implicit Namespace Packages introduces packages which have no __init__.py file and can be made of multiple packages. It looks like doctest doesn't support them.I would like to convert theLib/test/ of the Python standard library into such package for the issue#26295.I propose to use an heuristic when the package is only made of one directory (when module.__path__ only contains one entry): use this directory to lookup for requested test files.Attached patch implements that.
msg262637 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-03-29 23:30
New changeset32539353eb95 by Victor Stinner in branch 'default':doctest now supports packageshttps://hg.python.org/cpython/rev/32539353eb95
msg262638 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2016-03-29 23:31
I pushed a different fix using module.__path__ since my use case is the test module splitted into at least two directories.
History
DateUserActionArgs
2022-04-11 14:58:29adminsetgithub: 70828
2016-03-29 23:31:02vstinnersetstatus: open -> closed
resolution: fixed
messages: +msg262638
2016-03-29 23:30:19python-devsetnosy: +python-dev
messages: +msg262637
2016-03-25 12:00:46vstinnersetcomponents: + Library (Lib)
2016-03-25 12:00:35vstinnercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp