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
603dcf27
Kaydet (Commit)
603dcf27
authored
Haz 13, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Spruce up test_xmlrpc by using ModuleNotFoundError and moving to
unittest.main().
üst
d5b4e1d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
test_xmlrpc.py
Lib/test/test_xmlrpc.py
+7
-22
No files found.
Lib/test/test_xmlrpc.py
Dosyayı görüntüle @
603dcf27
...
...
@@ -13,9 +13,13 @@ import io
import
contextlib
from
test
import
support
try
:
import
gzip
except
ModuleNotFoundError
:
gzip
=
None
try
:
import
threading
except
Import
Error
:
except
ModuleNotFound
Error
:
threading
=
None
alist
=
[{
'astring'
:
'foo@bar.baz.spam'
,
...
...
@@ -785,6 +789,7 @@ class KeepaliveServerTestCase2(BaseKeepaliveServerTestCase):
#A test case that verifies that gzip encoding works in both directions
#(for a request and the response)
@unittest.skipIf
(
gzip
is
None
,
'requires gzip'
)
class
GzipServerTestCase
(
BaseServerTestCase
):
#a request handler that supports keep-alive and logs requests into a
#class variable
...
...
@@ -1074,25 +1079,5 @@ class UseBuiltinTypesTestCase(unittest.TestCase):
self
.
assertTrue
(
server
.
use_builtin_types
)
@support.reap_threads
def
test_main
():
xmlrpc_tests
=
[
XMLRPCTestCase
,
HelperTestCase
,
DateTimeTestCase
,
BinaryTestCase
,
FaultTestCase
]
xmlrpc_tests
.
append
(
UseBuiltinTypesTestCase
)
xmlrpc_tests
.
append
(
SimpleServerTestCase
)
xmlrpc_tests
.
append
(
KeepaliveServerTestCase1
)
xmlrpc_tests
.
append
(
KeepaliveServerTestCase2
)
try
:
import
gzip
xmlrpc_tests
.
append
(
GzipServerTestCase
)
except
ImportError
:
pass
#gzip not supported in this build
xmlrpc_tests
.
append
(
MultiPathServerTestCase
)
xmlrpc_tests
.
append
(
ServerProxyTestCase
)
xmlrpc_tests
.
append
(
FailingServerTestCase
)
xmlrpc_tests
.
append
(
CGIHandlerTestCase
)
support
.
run_unittest
(
*
xmlrpc_tests
)
if
__name__
==
"__main__"
:
test_main
()
support
.
reap_threads
(
unittest
.
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