Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54650 - sandbox-branches/bhy/py3k/libs/python/test
From: divinekid_at_[hidden]
Date: 2009-07-04 12:43:31


Author: bhy
Date: 2009-07-04 12:43:31 EDT (Sat, 04 Jul 2009)
New Revision: 54650
URL: http://svn.boost.org/trac/boost/changeset/54650

Log:
fix builtin_converters to remove 42L and u'...' appeared in doctest result
Text files modified:
   sandbox-branches/bhy/py3k/libs/python/test/test_builtin_converters.py | 36 +++++++++++++-----------------------
   1 files changed, 13 insertions(+), 23 deletions(-)

Modified: sandbox-branches/bhy/py3k/libs/python/test/test_builtin_converters.py
==============================================================================
--- sandbox-branches/bhy/py3k/libs/python/test/test_builtin_converters.py (original)
+++ sandbox-branches/bhy/py3k/libs/python/test/test_builtin_converters.py 2009-07-04 12:43:31 EDT (Sat, 04 Jul 2009)
@@ -56,10 +56,10 @@
>>> hex(rewrap_value_unsigned_long(0x80000001L)).replace('L','')
 '0x80000001'
 
->>> rewrap_value_long_long(42)
-42L
->>> rewrap_value_unsigned_long_long(42)
-42L
+>>> rewrap_value_long_long(42) == 42
+True
+>>> rewrap_value_unsigned_long_long(42) == 42
+True
 
    show that we have range checking.
  
@@ -87,23 +87,13 @@
>>> rewrap_value_string('yo, wassup?')
 'yo, wassup?'
 
->>> try:
-... if unicode: pass
-... except:
-... print "u'yo, wassup?'"
-... else:
-... eval("rewrap_value_wstring(u'yo, wassup?')")
-u'yo, wassup?'
-
+>>> print rewrap_value_wstring(u'yo, wassup?')
+yo, wassup?
+
    test that overloading on unicode works:
 
->>> try:
-... if unicode: pass
-... except:
-... print "u'yo, wassup?'"
-... else:
-... eval("rewrap_value_string(u'yo, wassup?')")
-u'yo, wassup?'
+>>> print rewrap_value_string(u'yo, wassup?')
+yo, wassup?
 
    wrap strings with embedded nulls:
    
@@ -155,10 +145,10 @@
 42
>>> rewrap_const_reference_unsigned_long(42)
 42
->>> rewrap_const_reference_long_long(42)
-42L
->>> rewrap_const_reference_unsigned_long_long(42)
-42L
+>>> rewrap_const_reference_long_long(42) == 42
+True
+>>> rewrap_const_reference_unsigned_long_long(42) == 42
+True
 
 
>>> assert abs(rewrap_const_reference_float(4.2) - 4.2) < .000001


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk