Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 69e3bda

Browse files
committed
Issue #15494: test.support is now a package rather than a module
Also including this change in 3.3 to help avoid spurious conflicts between the two most active branches. (Initial patch by Indra Talip)
1 parent 725d9dd commit 69e3bda

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,12 @@ def temp_umask(umask):
787787
finally:
788788
os.umask(oldmask)
789789

790+
# TEST_HOME refers to the top level directory of the "test" package
791+
# that contains Python's regression test suite
792+
TEST_HOME = os.path.dirname(os.path.abspath(__file__))
790793

791-
def findfile(file, here=__file__, subdir=None):
792-
"""Try to find a file on sys.path and the working directory. If it is not
794+
def findfile(file, here=TEST_HOME, subdir=None):
795+
"""Try to find a file on sys.path or in the test directory. If it is not
793796
found the argument passed to the function is returned (this does not
794797
necessarily signal failure; could still be the legitimate path)."""
795798
if os.path.isabs(file):

Lib/test/test_linecache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
EMPTY = ''
1212
TESTS = 'inspect_fodder inspect_fodder2 mapping_tests'
1313
TESTS = TESTS.split()
14-
TEST_PATH = os.path.dirname(support.__file__)
14+
TEST_PATH = os.path.dirname(__file__)
1515
MODULES = "linecache abc".split()
1616
MODULE_PATH = os.path.dirname(FILENAME)
1717

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ Thenault Sylvain
12021202
Péter Szabó
12031203
Amir Szekely
12041204
Arfrever Frehtes Taifersar Arahesis
1205+
Indra Talip
12051206
Neil Tallim
12061207
Geoff Talvola
12071208
Musashi Tamura

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ IDLE
222222
Tests
223223
-----
224224

225+
- Issue #15494: test.support is now a package rather than a module (Initial
226+
patch by Indra Talip)
227+
225228
- Issue #17944: test_zipfile now discoverable and uses subclassing to
226229
generate tests for different compression types. Fixed a bug with skipping
227230
some tests due to use of exhausted iterators.

0 commit comments

Comments
 (0)