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
7f19f662
Kaydet (Commit)
7f19f662
authored
Agu 24, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up after a merge left behind old except clause syntax.
üst
04110fb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test_xmlrpc.py
Lib/test/test_xmlrpc.py
+6
-6
No files found.
Lib/test/test_xmlrpc.py
Dosyayı görüntüle @
7f19f662
...
@@ -306,7 +306,7 @@ class SimpleServerTestCase(unittest.TestCase):
...
@@ -306,7 +306,7 @@ class SimpleServerTestCase(unittest.TestCase):
try
:
try
:
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
self
.
assertEqual
(
p
.
pow
(
6
,
8
),
6
**
8
)
self
.
assertEqual
(
p
.
pow
(
6
,
8
),
6
**
8
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
@@ -317,7 +317,7 @@ class SimpleServerTestCase(unittest.TestCase):
...
@@ -317,7 +317,7 @@ class SimpleServerTestCase(unittest.TestCase):
expected_methods
=
set
([
'pow'
,
'div'
,
'add'
,
'system.listMethods'
,
expected_methods
=
set
([
'pow'
,
'div'
,
'add'
,
'system.listMethods'
,
'system.methodHelp'
,
'system.methodSignature'
,
'system.multicall'
])
'system.methodHelp'
,
'system.methodSignature'
,
'system.multicall'
])
self
.
assertEqual
(
set
(
meth
),
expected_methods
)
self
.
assertEqual
(
set
(
meth
),
expected_methods
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
@@ -326,7 +326,7 @@ class SimpleServerTestCase(unittest.TestCase):
...
@@ -326,7 +326,7 @@ class SimpleServerTestCase(unittest.TestCase):
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
divhelp
=
p
.
system
.
methodHelp
(
'div'
)
divhelp
=
p
.
system
.
methodHelp
(
'div'
)
self
.
assertEqual
(
divhelp
,
'This is the div function'
)
self
.
assertEqual
(
divhelp
,
'This is the div function'
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
@@ -337,7 +337,7 @@ class SimpleServerTestCase(unittest.TestCase):
...
@@ -337,7 +337,7 @@ class SimpleServerTestCase(unittest.TestCase):
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
divsig
=
p
.
system
.
methodSignature
(
'div'
)
divsig
=
p
.
system
.
methodSignature
(
'div'
)
self
.
assertEqual
(
divsig
,
'signatures not supported'
)
self
.
assertEqual
(
divsig
,
'signatures not supported'
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
@@ -352,7 +352,7 @@ class SimpleServerTestCase(unittest.TestCase):
...
@@ -352,7 +352,7 @@ class SimpleServerTestCase(unittest.TestCase):
self
.
assertEqual
(
add_result
,
2
+
3
)
self
.
assertEqual
(
add_result
,
2
+
3
)
self
.
assertEqual
(
pow_result
,
6
**
8
)
self
.
assertEqual
(
pow_result
,
6
**
8
)
self
.
assertEqual
(
div_result
,
127
//
42
)
self
.
assertEqual
(
div_result
,
127
//
42
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
@@ -402,7 +402,7 @@ class FailingServerTestCase(unittest.TestCase):
...
@@ -402,7 +402,7 @@ class FailingServerTestCase(unittest.TestCase):
try
:
try
:
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
p
=
xmlrpclib
.
ServerProxy
(
'http://localhost:
%
d'
%
PORT
)
self
.
assertEqual
(
p
.
pow
(
6
,
8
),
6
**
8
)
self
.
assertEqual
(
p
.
pow
(
6
,
8
),
6
**
8
)
except
xmlrpclib
.
ProtocolError
,
e
:
except
xmlrpclib
.
ProtocolError
as
e
:
# protocol error; provide additional information in test output
# protocol error; provide additional information in test output
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
self
.
fail
(
"
%
s
\n
%
s"
%
(
e
,
e
.
headers
))
...
...
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