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
35173698
Commit
35173698
authored
May 22, 2011
by
Tarek Ziade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 12132 - skip the test_buil_ext test if the xx module is not found
parent
2bc55e48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
Lib/distutils/tests/test_build_ext.py
Lib/distutils/tests/test_build_ext.py
+5
-1
Lib/packaging/tests/test_command_build_ext.py
Lib/packaging/tests/test_command_build_ext.py
+5
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/distutils/tests/test_build_ext.py
View file @
35173698
...
@@ -35,7 +35,9 @@ class BuildExtTestCase(TempdirManager,
...
@@ -35,7 +35,9 @@ class BuildExtTestCase(TempdirManager,
self
.
tmp_dir
=
self
.
mkdtemp
()
self
.
tmp_dir
=
self
.
mkdtemp
()
self
.
sys_path
=
sys
.
path
,
sys
.
path
[:]
self
.
sys_path
=
sys
.
path
,
sys
.
path
[:]
sys
.
path
.
append
(
self
.
tmp_dir
)
sys
.
path
.
append
(
self
.
tmp_dir
)
shutil
.
copy
(
_get_source_filename
(),
self
.
tmp_dir
)
filename
=
_get_source_filename
()
if
os
.
path
.
exists
(
filename
):
shutil
.
copy
(
filename
,
self
.
tmp_dir
)
if
sys
.
version
>
"2.6"
:
if
sys
.
version
>
"2.6"
:
import
site
import
site
self
.
old_user_base
=
site
.
USER_BASE
self
.
old_user_base
=
site
.
USER_BASE
...
@@ -65,6 +67,8 @@ class BuildExtTestCase(TempdirManager,
...
@@ -65,6 +67,8 @@ class BuildExtTestCase(TempdirManager,
def
test_build_ext
(
self
):
def
test_build_ext
(
self
):
global
ALREADY_TESTED
global
ALREADY_TESTED
xx_c
=
os
.
path
.
join
(
self
.
tmp_dir
,
'xxmodule.c'
)
xx_c
=
os
.
path
.
join
(
self
.
tmp_dir
,
'xxmodule.c'
)
if
not
os
.
path
.
exists
(
xx_c
):
return
xx_ext
=
Extension
(
'xx'
,
[
xx_c
])
xx_ext
=
Extension
(
'xx'
,
[
xx_c
])
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
.
package_dir
=
self
.
tmp_dir
dist
.
package_dir
=
self
.
tmp_dir
...
...
Lib/packaging/tests/test_command_build_ext.py
View file @
35173698
...
@@ -32,7 +32,8 @@ class BuildExtTestCase(support.TempdirManager,
...
@@ -32,7 +32,8 @@ class BuildExtTestCase(support.TempdirManager,
self
.
sys_path
=
sys
.
path
,
sys
.
path
[:]
self
.
sys_path
=
sys
.
path
,
sys
.
path
[:]
sys
.
path
.
append
(
self
.
tmp_dir
)
sys
.
path
.
append
(
self
.
tmp_dir
)
filename
=
_get_source_filename
()
filename
=
_get_source_filename
()
shutil
.
copy
(
filename
,
self
.
tmp_dir
)
if
os
.
path
.
exists
(
filename
):
shutil
.
copy
(
filename
,
self
.
tmp_dir
)
self
.
old_user_base
=
site
.
USER_BASE
self
.
old_user_base
=
site
.
USER_BASE
site
.
USER_BASE
=
self
.
mkdtemp
()
site
.
USER_BASE
=
self
.
mkdtemp
()
build_ext
.
USER_BASE
=
site
.
USER_BASE
build_ext
.
USER_BASE
=
site
.
USER_BASE
...
@@ -59,6 +60,9 @@ class BuildExtTestCase(support.TempdirManager,
...
@@ -59,6 +60,9 @@ class BuildExtTestCase(support.TempdirManager,
def
test_build_ext
(
self
):
def
test_build_ext
(
self
):
global
ALREADY_TESTED
global
ALREADY_TESTED
xx_c
=
os
.
path
.
join
(
self
.
tmp_dir
,
'xxmodule.c'
)
xx_c
=
os
.
path
.
join
(
self
.
tmp_dir
,
'xxmodule.c'
)
if
not
os
.
path
.
exists
(
xx_c
):
# skipping if we cannot find it
return
xx_ext
=
Extension
(
'xx'
,
[
xx_c
])
xx_ext
=
Extension
(
'xx'
,
[
xx_c
])
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
.
package_dir
=
self
.
tmp_dir
dist
.
package_dir
=
self
.
tmp_dir
...
...
Misc/NEWS
View file @
35173698
...
@@ -153,6 +153,8 @@ Core and Builtins
...
@@ -153,6 +153,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #12132: Skip test_build_ext in case the xxmodule is not found.
- Issue #12105: Add O_CLOEXEC to the os module.
- Issue #12105: Add O_CLOEXEC to the os module.
- Issue #12079: Decimal('
Infinity
').fma(Decimal('
0
'), (3.91224318126786e+19+0j))
- Issue #12079: Decimal('
Infinity
').fma(Decimal('
0
'), (3.91224318126786e+19+0j))
...
...
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