lists.arthurdejong.org
RSS feed

python-stdnum commit: r32 - python-stdnum/tests

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r32 - python-stdnum/tests



Author: arthur
Date: Sat Aug 21 14:41:00 2010
New Revision: 32
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=32

Log:
simplify ranges tests a bit

Modified:
   python-stdnum/tests/test_isbn.doctest

Modified: python-stdnum/tests/test_isbn.doctest
==============================================================================
--- python-stdnum/tests/test_isbn.doctest       Sat Aug 21 14:40:04 2010        
(r31)
+++ python-stdnum/tests/test_isbn.doctest       Sat Aug 21 14:41:00 2010        
(r32)
@@ -141,14 +141,15 @@
 >>> import urllib
 >>> ranges.download('file://' + urllib.pathname2url(xmlfile.name))
 >>> import sys
->>> output = StringIO.StringIO()
->>> save_stdout = sys.stdout
->>> sys.stdout = output
 >>> ranges.output()
->>> sys.stdout = save_stdout
->>> output = output.getvalue()
->>> '\n978 0-5 600-649\n' in output and '\n978-0 00-19 200-699\n' in output
-True
+# generated from RangeMessage.xml, downloaded from
+# http://www.isbn-international.org/agency?rmxml=1
+# serial 0aad2b046ddd9b30e080cb2b24afc868
+# date Thu, 20 May 2010 18:36:55 GMT
+_prefixes = """
+978 0-5 600-649
+978-0 00-19 200-699
+"""
 
 Restore the original ranges and clean up.
 
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits