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
00e1f63c
Commit
00e1f63c
authored
Jul 09, 2009
by
R. David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test work with -O.
parent
8a624a9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Lib/test/test_import.py
Lib/test/test_import.py
+8
-2
No files found.
Lib/test/test_import.py
View file @
00e1f63c
...
...
@@ -7,7 +7,8 @@ import sys
import
py_compile
import
warnings
import
marshal
from
test.test_support
import
unlink
,
TESTFN
,
unload
,
run_unittest
,
check_warnings
from
test.test_support
import
(
unlink
,
TESTFN
,
unload
,
run_unittest
,
check_warnings
,
TestFailed
)
def
remove_files
(
name
):
...
...
@@ -102,7 +103,12 @@ class ImportTest(unittest.TestCase):
os
.
chmod
(
fname
,
(
stat
.
S_IRUSR
|
stat
.
S_IRGRP
|
stat
.
S_IROTH
|
stat
.
S_IXUSR
|
stat
.
S_IXGRP
|
stat
.
S_IXOTH
))
__import__
(
TESTFN
)
s
=
os
.
stat
(
fname
+
'c'
)
fn
=
fname
+
'c'
if
not
os
.
path
.
exists
(
fn
):
fn
=
fname
+
'o'
if
not
os
.
path
.
exists
(
fn
):
raise
TestFailed
(
"__import__ did "
"not result in creation of either a .pyc or .pyo file"
)
s
=
os
.
stat
(
fn
)
self
.
assertEquals
(
stat
.
S_IMODE
(
s
.
st_mode
),
stat
.
S_IRUSR
|
stat
.
S_IRGRP
|
stat
.
S_IROTH
)
finally
:
...
...
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