8000 simplify ranges tests a bit · odony/python-stdnum@97d5280 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 97d5280

Browse files
committed
simplify ranges tests a bit
git-svn-id: http://arthurdejong.org/svn/python-stdnum/python-stdnum@32 9dea7c4f-944c-4273-ac1a-574ede026edc
1 parent f3b025b commit 97d5280

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/test_isbn.doctest

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,15 @@ content of the XML has been
141141
>>> import urllib
142142
>>> ranges.download('file://' + urllib.pathname2url(xmlfile.name))
143143
>>> import sys
144-
>>> output = StringIO.StringIO()
145-
>>> save_stdout = sys.stdout
146-
>>> sys.stdout = output
147144
>>> ranges.output()
148-
>>> sys.stdout = save_stdout
149-
>>> output = output.getvalue()
150-
>>> '\n978 0-5 600-649\n' in output and '\n978-0 00-19 200-699\n' in output
151-
True
145+
# generated from RangeMessage.xml, downloaded from
146+
# http://www.isbn-international.org/agency?rmxml=1
147+
# serial 0aad2b046ddd9b30e080cb2b24afc868
148+
# date Thu, 20 May 2010 18:36:55 GMT
149+
_prefixes = """
150+
978 0-5 600-649
151+
978-0 00-19 200-699
152+
"""
152153

153154
Restore the original ranges and clean up.
154155

0 commit comments

Comments
 (0)
0