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
dd61c3ba
Kaydet (Commit)
dd61c3ba
authored
Kas 20, 2012
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Do a better job of preserving the state of sys.modules.
üst
a2102047
ed843b5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
test_path.py
Lib/test/test_importlib/import_/test_path.py
+6
-1
No files found.
Lib/test/test_importlib/import_/test_path.py
Dosyayı görüntüle @
dd61c3ba
...
@@ -98,13 +98,18 @@ class FinderTests(unittest.TestCase):
...
@@ -98,13 +98,18 @@ class FinderTests(unittest.TestCase):
new_path_hooks
=
[
zipimport
.
zipimporter
,
new_path_hooks
=
[
zipimport
.
zipimporter
,
_bootstrap
.
FileFinder
.
path_hook
(
_bootstrap
.
FileFinder
.
path_hook
(
*
_bootstrap
.
_get_supported_file_loaders
())]
*
_bootstrap
.
_get_supported_file_loaders
())]
with
util
.
uncache
(
'email'
):
missing
=
object
()
email
=
sys
.
modules
.
pop
(
'email'
,
missing
)
try
:
with
util
.
import_state
(
meta_path
=
sys
.
meta_path
[:],
with
util
.
import_state
(
meta_path
=
sys
.
meta_path
[:],
path
=
new_path
,
path
=
new_path
,
path_importer_cache
=
new_path_importer_cache
,
path_importer_cache
=
new_path_importer_cache
,
path_hooks
=
new_path_hooks
):
path_hooks
=
new_path_hooks
):
module
=
import_module
(
'email'
)
module
=
import_module
(
'email'
)
self
.
assertIsInstance
(
module
,
ModuleType
)
self
.
assertIsInstance
(
module
,
ModuleType
)
finally
:
if
email
is
not
missing
:
sys
.
modules
[
'email'
]
=
email
def
test_main
():
def
test_main
():
...
...
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