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
80e8c998
Kaydet (Commit)
80e8c998
authored
Nis 04, 2007
tarafından
Collin Winter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Stop using test_support.verify().
üst
9475db76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
test___all__.py
Lib/test/test___all__.py
+6
-8
No files found.
Lib/test/test___all__.py
Dosyayı görüntüle @
80e8c998
import
unittest
from
test
import
test_support
from
test.test_support
import
verify
,
verbose
from
test.test_support
import
verbose
,
run_unittest
import
sys
import
warnings
...
...
@@ -22,15 +20,15 @@ class AllTest(unittest.TestCase):
# Silent fail here seems the best route since some modules
# may not be available in all environments.
return
verify
(
hasattr
(
sys
.
modules
[
modname
],
"__all__"
),
"
%
s has no __all__ attribute"
%
modname
)
self
.
failUnless
(
hasattr
(
sys
.
modules
[
modname
],
"__all__"
),
"
%
s has no __all__ attribute"
%
modname
)
names
=
{}
exec
"from
%
s import *"
%
modname
in
names
if
names
.
has_key
(
"__builtins__"
)
:
if
"__builtins__"
in
names
:
del
names
[
"__builtins__"
]
keys
=
set
(
names
)
all
=
set
(
sys
.
modules
[
modname
]
.
__all__
)
verify
(
keys
==
all
,
"
%
s !=
%
s"
%
(
keys
,
all
)
)
self
.
assertEqual
(
keys
,
all
)
def
test_all
(
self
):
if
not
sys
.
platform
.
startswith
(
'java'
):
...
...
@@ -181,7 +179,7 @@ class AllTest(unittest.TestCase):
def
test_main
():
test_support
.
run_unittest
(
AllTest
)
run_unittest
(
AllTest
)
if
__name__
==
"__main__"
:
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