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
05f29b7a
Commit
05f29b7a
authored
Jan 25, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test work under 32-bit systems, and when invoked through Lib/test/regrtest.py
(rather than `-m test.regrtest`)
parent
2be60afb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
Lib/test/test_import.py
Lib/test/test_import.py
+16
-8
No files found.
Lib/test/test_import.py
View file @
05f29b7a
...
...
@@ -313,14 +313,22 @@ class ImportTests(unittest.TestCase):
def
test_timestamp_overflow
(
self
):
# A modification timestamp larger than 2**32 should not be a problem
# when importing a module (issue #11235).
source
=
TESTFN
+
".py"
compiled
=
imp
.
cache_from_source
(
source
)
with
open
(
source
,
'w'
)
as
f
:
pass
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
__import__
(
TESTFN
)
# The pyc file was created.
os
.
stat
(
compiled
)
sys
.
path
.
insert
(
0
,
os
.
curdir
)
try
:
source
=
TESTFN
+
".py"
compiled
=
imp
.
cache_from_source
(
source
)
with
open
(
source
,
'w'
)
as
f
:
pass
try
:
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
except
OverflowError
:
self
.
skipTest
(
"cannot set modification time to large integer"
)
__import__
(
TESTFN
)
# The pyc file was created.
os
.
stat
(
compiled
)
finally
:
del
sys
.
path
[
0
]
remove_files
(
TESTFN
)
class
PycRewritingTests
(
unittest
.
TestCase
):
...
...
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