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
586b83c4
Kaydet (Commit)
586b83c4
authored
Mar 15, 2006
tarafından
Nick Coghlan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't let cleanup errors mask real errors in the runpy tests
üst
a2173a18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
test_runpy.py
Lib/test/test_runpy.py
+18
-5
No files found.
Lib/test/test_runpy.py
Dosyayı görüntüle @
586b83c4
...
@@ -116,17 +116,30 @@ class RunModuleTest(unittest.TestCase):
...
@@ -116,17 +116,30 @@ class RunModuleTest(unittest.TestCase):
for
i
in
range
(
depth
+
1
):
# Don't forget the module itself
for
i
in
range
(
depth
+
1
):
# Don't forget the module itself
parts
=
mod_name
.
rsplit
(
"."
,
i
)
parts
=
mod_name
.
rsplit
(
"."
,
i
)
entry
=
parts
[
0
]
entry
=
parts
[
0
]
del
sys
.
modules
[
entry
]
try
:
del
sys
.
modules
[
entry
]
except
KeyError
,
ex
:
if
verbose
:
print
ex
# Persist with cleaning up
if
verbose
:
print
" Removed sys.modules entries"
if
verbose
:
print
" Removed sys.modules entries"
del
sys
.
path
[
0
]
del
sys
.
path
[
0
]
if
verbose
:
print
" Removed sys.path entry"
if
verbose
:
print
" Removed sys.path entry"
for
root
,
dirs
,
files
in
os
.
walk
(
top
,
topdown
=
False
):
for
root
,
dirs
,
files
in
os
.
walk
(
top
,
topdown
=
False
):
for
name
in
files
:
for
name
in
files
:
os
.
remove
(
os
.
path
.
join
(
root
,
name
))
try
:
os
.
remove
(
os
.
path
.
join
(
root
,
name
))
except
OSError
,
ex
:
if
verbose
:
print
ex
# Persist with cleaning up
for
name
in
dirs
:
for
name
in
dirs
:
os
.
rmdir
(
os
.
path
.
join
(
root
,
name
))
fullname
=
os
.
path
.
join
(
root
,
name
)
os
.
rmdir
(
top
)
try
:
if
verbose
:
print
" Removed package tree"
os
.
rmdir
(
fullname
)
except
OSError
,
ex
:
if
verbose
:
print
ex
# Persist with cleaning up
try
:
os
.
rmdir
(
top
)
if
verbose
:
print
" Removed package tree"
except
OSError
,
ex
:
if
verbose
:
print
ex
# Persist with cleaning up
def
_check_module
(
self
,
depth
):
def
_check_module
(
self
,
depth
):
pkg_dir
,
mod_fname
,
mod_name
=
(
pkg_dir
,
mod_fname
,
mod_name
=
(
...
...
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