Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fc11867a
Commit
fc11867a
authored
Feb 04, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed _testXXX to _testcapiXXX. Jack is my hero -- good call!
parent
32163cea
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
33 deletions
+50
-33
Lib/test/test_capi.py
Lib/test/test_capi.py
+6
-6
Misc/NEWS
Misc/NEWS
+11
-0
Modules/_testcapimodule.c
Modules/_testcapimodule.c
+3
-3
PCbuild/_testcapi.dsp
PCbuild/_testcapi.dsp
+16
-16
PCbuild/pcbuild.dsw
PCbuild/pcbuild.dsw
+7
-1
PCbuild/python20.wse
PCbuild/python20.wse
+4
-4
PCbuild/readme.txt
PCbuild/readme.txt
+2
-2
setup.py
setup.py
+1
-1
No files found.
Lib/test/test_capi.py
View file @
fc11867a
# Run the _test
module tests (tests for the Python/C API): by defn, these
# Run the _test
capi module tests (tests for the Python/C API): by defn,
# are all functions _test exports whose name begins with 'test_'.
#
these
are all functions _test exports whose name begins with 'test_'.
import
sys
import
sys
import
test_support
import
test_support
import
_test
import
_test
capi
for
name
in
dir
(
_test
):
for
name
in
dir
(
_test
capi
):
if
name
.
startswith
(
'test_'
):
if
name
.
startswith
(
'test_'
):
test
=
getattr
(
_test
,
name
)
test
=
getattr
(
_test
capi
,
name
)
if
test_support
.
verbose
:
if
test_support
.
verbose
:
print
"internal"
,
name
print
"internal"
,
name
try
:
try
:
test
()
test
()
except
_test
.
error
:
except
_test
capi
.
error
:
raise
test_support
.
TestFailed
,
sys
.
exc_info
()[
1
]
raise
test_support
.
TestFailed
,
sys
.
exc_info
()[
1
]
Misc/NEWS
View file @
fc11867a
What's New in Python 2.1 alpha 507?
===================================
Core language, builtins, and interpreter
Standard library
Windows changes
- Build: Subproject _test (effectively) renamed to _testcapi.
What's New in Python 2.1 alpha 2?
What's New in Python 2.1 alpha 2?
=================================
=================================
...
...
Modules/_testmodule.c
→
Modules/_test
capi
module.c
View file @
fc11867a
...
@@ -56,13 +56,13 @@ static PyMethodDef TestMethods[] = {
...
@@ -56,13 +56,13 @@ static PyMethodDef TestMethods[] = {
};
};
DL_EXPORT
(
void
)
DL_EXPORT
(
void
)
init_test
(
void
)
init_test
capi
(
void
)
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
m
=
Py_InitModule
(
"_test"
,
TestMethods
);
m
=
Py_InitModule
(
"_test
capi
"
,
TestMethods
);
TestError
=
PyErr_NewException
(
"_test.error"
,
NULL
,
NULL
);
TestError
=
PyErr_NewException
(
"_test
capi
.error"
,
NULL
,
NULL
);
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
PyDict_SetItemString
(
d
,
"error"
,
TestError
);
PyDict_SetItemString
(
d
,
"error"
,
TestError
);
}
}
PCbuild/_test.dsp
→
PCbuild/_test
capi
.dsp
View file @
fc11867a
# Microsoft Developer Studio Project File - Name="_test" - Package Owner=<4>
# Microsoft Developer Studio Project File - Name="_test
capi
" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=_test - Win32 Debug
CFG=_test
capi
- Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE
!MESSAGE NMAKE /f "_test.mak".
!MESSAGE NMAKE /f "_test
capi
.mak".
!MESSAGE
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE
!MESSAGE NMAKE /f "_test
.mak" CFG="_test
- Win32 Debug"
!MESSAGE NMAKE /f "_test
capi.mak" CFG="_testcapi
- Win32 Debug"
!MESSAGE
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE
!MESSAGE "_test - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "_test
capi
- Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "_test - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "_test
capi
- Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!MESSAGE
# Begin Project
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "_test"
# PROP Scc_ProjName "_test
capi
"
# PROP Scc_LocalPath ".."
# PROP Scc_LocalPath ".."
CPP=cl.exe
CPP=cl.exe
MTL=midl.exe
MTL=midl.exe
RSC=rc.exe
RSC=rc.exe
!IF "$(CFG)" == "_test - Win32 Release"
!IF "$(CFG)" == "_test
capi
- Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Use_Debug_Libraries 0
...
@@ -39,7 +39,7 @@ RSC=rc.exe
...
@@ -39,7 +39,7 @@ RSC=rc.exe
# PROP Use_MFC 0
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "."
# PROP Output_Dir "."
# PROP Intermediate_Dir "x86-temp-release\_test"
# PROP Intermediate_Dir "x86-temp-release\_test
capi
"
# PROP Ignore_Export_Lib 0
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# PROP Target_Dir ""
F90=df.exe
F90=df.exe
...
@@ -54,10 +54,10 @@ BSC32=bscmake.exe
...
@@ -54,10 +54,10 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1e1F0000" /dll /machine:I386 /out:"./_test
.pyd" /export:init_test
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1e1F0000" /dll /machine:I386 /out:"./_test
capi.pyd" /export:init_testcapi
# SUBTRACT LINK32 /pdb:none
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_test - Win32 Debug"
!ELSEIF "$(CFG)" == "_test
capi
- Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Use_Debug_Libraries 1
...
@@ -67,7 +67,7 @@ LINK32=link.exe
...
@@ -67,7 +67,7 @@ LINK32=link.exe
# PROP Use_MFC 0
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "."
# PROP Output_Dir "."
# PROP Intermediate_Dir "x86-temp-debug\_test"
# PROP Intermediate_Dir "x86-temp-debug\_test
capi
"
# PROP Ignore_Export_Lib 0
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# PROP Target_Dir ""
F90=df.exe
F90=df.exe
...
@@ -82,18 +82,18 @@ BSC32=bscmake.exe
...
@@ -82,18 +82,18 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1e1F0000" /dll /debug /machine:I386 /out:"./_test
_d.pyd" /pdbtype:sept /export:init_test
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1e1F0000" /dll /debug /machine:I386 /out:"./_test
capi_d.pyd" /pdbtype:sept /export:init_testcapi
# SUBTRACT LINK32 /pdb:none
# SUBTRACT LINK32 /pdb:none
!ENDIF
!ENDIF
# Begin Target
# Begin Target
# Name "_test - Win32 Release"
# Name "_test
capi
- Win32 Release"
# Name "_test - Win32 Debug"
# Name "_test
capi
- Win32 Debug"
# Begin Source File
# Begin Source File
SOURCE=..\Modules\_testmodule.c
SOURCE=..\Modules\_test
capi
module.c
# End Source File
# End Source File
# End Target
# End Target
# End Project
# End Project
PCbuild/pcbuild.dsw
View file @
fc11867a
...
@@ -41,11 +41,14 @@ Package=<5>
...
@@ -41,11 +41,14 @@ Package=<5>
Package=<4>
Package=<4>
{{{
{{{
Begin Project Dependency
Project_Dep_Name pythoncore
End Project Dependency
}}}
}}}
###############################################################################
###############################################################################
Project: "_test
"=.\_test
.dsp - Package Owner=<4>
Project: "_test
capi"=.\_testcapi
.dsp - Package Owner=<4>
Package=<5>
Package=<5>
{{{
{{{
...
@@ -53,6 +56,9 @@ Package=<5>
...
@@ -53,6 +56,9 @@ Package=<5>
Package=<4>
Package=<4>
{{{
{{{
Begin Project Dependency
Project_Dep_Name pythoncore
End Project Dependency
}}}
}}}
###############################################################################
###############################################################################
...
...
PCbuild/python20.wse
View file @
fc11867a
...
@@ -697,8 +697,8 @@ item: Install File
...
@@ -697,8 +697,8 @@ item: Install File
Flags=0000000000000010
Flags=0000000000000010
end
end
item: Install File
item: Install File
Source=%_SRC_%\PCbuild\_test.pyd
Source=%_SRC_%\PCbuild\_test
capi
.pyd
Destination=%MAINDIR%\DLLs\_test.pyd
Destination=%MAINDIR%\DLLs\_test
capi
.pyd
Flags=0000000000000010
Flags=0000000000000010
end
end
item: Install File
item: Install File
...
@@ -771,8 +771,8 @@ item: Install File
...
@@ -771,8 +771,8 @@ item: Install File
Flags=0000000000000010
Flags=0000000000000010
end
end
item: Install File
item: Install File
Source=%_SRC_%\PCbuild\_test.lib
Source=%_SRC_%\PCbuild\_test
capi
.lib
Destination=%MAINDIR%\libs\_test.lib
Destination=%MAINDIR%\libs\_test
capi
.lib
Flags=0000000000000010
Flags=0000000000000010
end
end
item: Install File
item: Install File
...
...
PCbuild/readme.txt
View file @
fc11867a
...
@@ -45,9 +45,9 @@ _sre
...
@@ -45,9 +45,9 @@ _sre
Unicode-aware regular expression engine
Unicode-aware regular expression engine
_symtable
_symtable
the _symtable module, symtablemodule.c
the _symtable module, symtablemodule.c
_test
_test
capi
tests of the Python C API, run via Lib/test/test_capi.py, and
tests of the Python C API, run via Lib/test/test_capi.py, and
implemented by module Modules/_testmodule.c
implemented by module Modules/_test
capi
module.c
mmap
mmap
mmapmodule.c
mmapmodule.c
parser
parser
...
...
setup.py
View file @
fc11867a
...
@@ -176,7 +176,7 @@ class PyBuildExt(build_ext):
...
@@ -176,7 +176,7 @@ class PyBuildExt(build_ext):
# access to the builtin codecs and codec registry
# access to the builtin codecs and codec registry
exts
.
append
(
Extension
(
'_codecs'
,
[
'_codecsmodule.c'
])
)
exts
.
append
(
Extension
(
'_codecs'
,
[
'_codecsmodule.c'
])
)
# Python C API test module
# Python C API test module
exts
.
append
(
Extension
(
'_test
'
,
[
'_test
module.c'
])
)
exts
.
append
(
Extension
(
'_test
capi'
,
[
'_testcapi
module.c'
])
)
# static Unicode character database
# static Unicode character database
exts
.
append
(
Extension
(
'unicodedata'
,
[
'unicodedata.c'
])
)
exts
.
append
(
Extension
(
'unicodedata'
,
[
'unicodedata.c'
])
)
# access to ISO C locale support
# access to ISO C locale support
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment