This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: move doctest test-data files into a subdirectory of Lib/test
Type: enhancement Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.10
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: 00Kai0, chris.jerdonek, ezio.melotti, iritkatriel, jaywink, polischouckserg, r.david.murray
Priority: normal Keywords: easy, patch

Created on 2012-09-10 17:00 by chris.jerdonek, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue15907.patch jaywink, 2014-08-02 13:29 Patch for issue 15907 review
issue15907_2.patch jaywink, 2014-08-07 16:56 review
issue15907_3.patch jaywink, 2014-08-07 16:57 hg diff --git review
Pull Requests
URL Status Linked Edit
PR 25914 closed 00Kai0, 2021-05-05 10:06
Messages (7)
msg170204 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-09-10 17:00
doctest currently has 8 "data" files used for testing that are spread across Lib/test (in addition to the main test files test_doctest.py and test_doctest2.py):

doctest_aliases.py
sample_doctest.py
sample_doctest_no_docstrings.py
sample_doctest_no_doctests.py
test_doctest.txt
test_doctest2.txt
test_doctest3.txt
test_doctest4.txt

This issue is to move these files into a common subdirectory of Lib/test (e.g. Lib/test/doctest).  This will simplify the organization of doctest's tests (e.g. by making the supporting files easier to discover) and reduce clutter in the main test directory.

Note that test_zipimport_support (and perhaps also test_pyclbr) will also require changes.

This issue came out of discussions with R. David Murray in the context of working on issue 14649.
msg221901 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-29 20:55
@Chris can you provide a patch for this?
msg224563 - (view) Author: Jason Robinson (jaywink) * Date: 2014-08-02 13:29
Here is a patch that hopefully does what was intended. All the tests passed locally, hopefully the tests we're adapted correctly to the new location of the files. My first patch :)

I added a new "data" file 'doctest_DocFileSuite_test.txt' to Lib/test to keep the test that tests that doctest.DocFileSuite loads files from calling module path. All the old files I moved to Lib/test/doctest and adapted tests to use them from there.
msg225032 - (view) Author: Jason Robinson (jaywink) * Date: 2014-08-07 16:56
Ezio, here are new versions of the patch. This time I used `hg mv` command to move the files to the new location and then copied over the correct versions. It does look though to me that there is no difference except timestamps.

I will upload also a --git version in the next comment.
msg225033 - (view) Author: Jason Robinson (jaywink) * Date: 2014-08-07 16:57
Here is the `hg diff --git` patch.

Hope this one applies :)
msg391236 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-16 17:24
The patch needs to be converted into a github PR.
msg397613 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-07-16 11:26
This kind of reorg was recently rejected in issue44573, while this issue being open inspired similar initiative (eg issue44650). For those reasons I am closing this.
History
Date User Action Args
2022-04-11 14:57:35adminsetgithub: 60111
2021-07-16 11:26:53iritkatrielsetstatus: open -> closed
resolution: not a bug
stage: patch review -> resolved
2021-07-16 11:26:40iritkatrielsetmessages: + msg397613
2021-05-06 19:26:28polischoucksergsetnosy: + polischouckserg
2021-05-05 10:06:2700Kai0setnosy: + 00Kai0

pull_requests: + pull_request24583
stage: needs patch -> patch review
2021-04-16 17:24:12iritkatrielsetversions: + Python 3.10, - Python 3.5
nosy: + iritkatriel

messages: + msg391236

keywords: + easy
stage: patch review -> needs patch
2019-04-26 20:26:50BreamoreBoysetnosy: - BreamoreBoy
2014-08-08 00:10:21berker.peksagsetstage: patch review
2014-08-07 16:57:40jaywinksetfiles: + issue15907_3.patch

messages: + msg225033
2014-08-07 16:56:32jaywinksetfiles: + issue15907_2.patch

messages: + msg225032
2014-08-02 13:29:36jaywinksetfiles: + issue15907.patch

nosy: + ezio.melotti, jaywink
messages: + msg224563

keywords: + patch
2014-06-29 20:55:03BreamoreBoysetversions: + Python 3.5, - Python 3.4
nosy: + BreamoreBoy

messages: + msg221901

type: enhancement
2012-09-10 17:00:58chris.jerdonekcreate