Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
dd21f689
Kaydet (Commit)
dd21f689
authored
Ock 25, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Port remaining test fixes, and fix test_importlib too.
üst
05f29b7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
test_file_loader.py
Lib/importlib/test/source/test_file_loader.py
+9
-1
test_import.py
Lib/test/test_import.py
+5
-0
No files found.
Lib/importlib/test/source/test_file_loader.py
Dosyayı görüntüle @
dd21f689
...
@@ -4,6 +4,7 @@ from .. import abc
...
@@ -4,6 +4,7 @@ from .. import abc
from
..
import
util
from
..
import
util
from
.
import
util
as
source_util
from
.
import
util
as
source_util
import
errno
import
imp
import
imp
import
marshal
import
marshal
import
os
import
os
...
@@ -136,7 +137,14 @@ class SimpleTest(unittest.TestCase):
...
@@ -136,7 +137,14 @@ class SimpleTest(unittest.TestCase):
compiled
=
imp
.
cache_from_source
(
source
)
compiled
=
imp
.
cache_from_source
(
source
)
with
open
(
source
,
'w'
)
as
f
:
with
open
(
source
,
'w'
)
as
f
:
f
.
write
(
"x = 5"
)
f
.
write
(
"x = 5"
)
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
try
:
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
except
OverflowError
:
self
.
skipTest
(
"cannot set modification time to large integer"
)
except
OSError
as
e
:
if
e
.
errno
!=
getattr
(
errno
,
'EOVERFLOW'
,
None
):
raise
self
.
skipTest
(
"cannot set modification time to large integer ({})"
.
format
(
e
))
loader
=
_bootstrap
.
_SourceFileLoader
(
'_temp'
,
mapping
[
'_temp'
])
loader
=
_bootstrap
.
_SourceFileLoader
(
'_temp'
,
mapping
[
'_temp'
])
mod
=
loader
.
load_module
(
'_temp'
)
mod
=
loader
.
load_module
(
'_temp'
)
# Sanity checks.
# Sanity checks.
...
...
Lib/test/test_import.py
Dosyayı görüntüle @
dd21f689
...
@@ -11,6 +11,7 @@ import stat
...
@@ -11,6 +11,7 @@ import stat
import
sys
import
sys
import
unittest
import
unittest
import
textwrap
import
textwrap
import
errno
from
test.support
import
(
from
test.support
import
(
EnvironmentVarGuard
,
TESTFN
,
check_warnings
,
forget
,
is_jython
,
EnvironmentVarGuard
,
TESTFN
,
check_warnings
,
forget
,
is_jython
,
...
@@ -323,6 +324,10 @@ class ImportTests(unittest.TestCase):
...
@@ -323,6 +324,10 @@ class ImportTests(unittest.TestCase):
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
os
.
utime
(
source
,
(
2
**
33
,
2
**
33
))
except
OverflowError
:
except
OverflowError
:
self
.
skipTest
(
"cannot set modification time to large integer"
)
self
.
skipTest
(
"cannot set modification time to large integer"
)
except
OSError
as
e
:
if
e
.
errno
!=
getattr
(
errno
,
'EOVERFLOW'
,
None
):
raise
self
.
skipTest
(
"cannot set modification time to large integer ({})"
.
format
(
e
))
__import__
(
TESTFN
)
__import__
(
TESTFN
)
# The pyc file was created.
# The pyc file was created.
os
.
stat
(
compiled
)
os
.
stat
(
compiled
)
...
...
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