Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
305c6b8f
Commit
305c6b8f
authored
Nov 03, 2009
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Since time.xmlrpc.com is unreliable, add another test to test_xmlrpc_net
parent
f964ac25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
Lib/test/test_xmlrpc_net.py
Lib/test/test_xmlrpc_net.py
+17
-2
No files found.
Lib/test/test_xmlrpc_net.py
View file @
305c6b8f
#!/usr/bin/env python
import
collections
import
errno
import
socket
import
sys
...
...
@@ -17,8 +18,7 @@ class CurrentTimeTest(unittest.TestCase):
try
:
t0
=
server
.
currentTime
.
getCurrentTime
()
except
socket
.
error
as
e
:
print
(
" test_current_time: skipping test, got error: %s"
%
e
,
file
=
sys
.
stderr
)
self
.
skipTest
(
"network error: %s"
%
e
)
return
# Perform a minimal sanity check on the result, just to be sure
...
...
@@ -35,6 +35,21 @@ class CurrentTimeTest(unittest.TestCase):
# time on the server should not be too big.
self
.
assertTrue
(
delta
.
days
<=
1
)
def
test_python_builders
(
self
):
# Get the list of builders from the XMLRPC buildbot interface at
# python.org.
server
=
xmlrpclib
.
ServerProxy
(
"http://www.python.org/dev/buildbot/all/xmlrpc/"
)
try
:
builders
=
server
.
getAllBuilders
()
except
socket
.
error
as
e
:
self
.
skipTest
(
"network error: %s"
%
e
)
return
# Perform a minimal sanity check on the result, just to be sure
# the request means what we think it means.
self
.
assertIsInstance
(
builders
,
collections
.
Sequence
)
self
.
assertTrue
([
x
for
x
in
builders
if
"trunk"
in
x
],
builders
)
def
test_main
():
support
.
requires
(
"network"
)
...
...
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