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
8820f2a9
Kaydet (Commit)
8820f2a9
authored
Nis 01, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add ``if __name__ == '__main__'`` to some test files where it didn't take a lot
of effort to do so.
üst
8d2a90af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
18 deletions
+36
-18
test_code.py
Lib/test/test_code.py
+4
-0
test_dl.py
Lib/test/test_dl.py
+23
-18
test_frozen.py
Lib/test/test_frozen.py
+5
-0
test_lib2to3.py
Lib/test/test_lib2to3.py
+4
-0
No files found.
Lib/test/test_code.py
Dosyayı görüntüle @
8820f2a9
...
...
@@ -100,3 +100,7 @@ def test_main(verbose=None):
from
test.test_support
import
run_doctest
from
test
import
test_code
run_doctest
(
test_code
,
verbose
)
if
__name__
==
'__main__'
:
test_main
()
Lib/test/test_dl.py
Dosyayı görüntüle @
8820f2a9
...
...
@@ -13,22 +13,27 @@ sharedlibs = [
(
'/usr/lib/libc.dylib'
,
'getpid'
),
]
for
s
,
func
in
sharedlibs
:
try
:
if
verbose
:
print
'trying to open:'
,
s
,
l
=
dl
.
open
(
s
)
except
dl
.
error
,
err
:
if
verbose
:
print
'failed'
,
repr
(
str
(
err
))
pass
def
test_main
():
for
s
,
func
in
sharedlibs
:
try
:
if
verbose
:
print
'trying to open:'
,
s
,
l
=
dl
.
open
(
s
)
except
dl
.
error
,
err
:
if
verbose
:
print
'failed'
,
repr
(
str
(
err
))
pass
else
:
if
verbose
:
print
'succeeded...'
,
l
.
call
(
func
)
l
.
close
()
if
verbose
:
print
'worked!'
break
else
:
if
verbose
:
print
'succeeded...'
,
l
.
call
(
func
)
l
.
close
()
if
verbose
:
print
'worked!'
break
else
:
raise
TestSkipped
,
'Could not open any shared libraries'
raise
TestSkipped
,
'Could not open any shared libraries'
if
__name__
==
'__main__'
:
test_main
()
Lib/test/test_frozen.py
Dosyayı görüntüle @
8820f2a9
...
...
@@ -38,3 +38,8 @@ class FrozenTests(unittest.TestCase):
def
test_main
():
run_unittest
(
FrozenTests
)
if
__name__
==
'__main__'
:
test_main
()
Lib/test/test_lib2to3.py
Dosyayı görüntüle @
8820f2a9
...
...
@@ -13,3 +13,7 @@ def suite():
def
test_main
():
run_unittest
(
suite
())
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