mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
Trivial fixes for Python 2.2a1. (One real problem remains...)
[SVN r10664]
This commit is contained in:
@@ -19,12 +19,12 @@ r'''>>> import pickle3
|
||||
... wd.z = 3. * number
|
||||
... pstr = pickle.dumps(wd)
|
||||
... wl = pickle.loads(pstr)
|
||||
... print wd.greet(), wd.get_secret_number(), wd.__dict__
|
||||
... print wl.greet(), wl.get_secret_number(), wl.__dict__
|
||||
Hello from California! 24 {'z': 72.0, 'x': 48, 'y': 'yyyyyyyyyyyyyyyyyyyyyyyy'}
|
||||
Hello from California! 24 {'z': 72.0, 'x': 48, 'y': 'yyyyyyyyyyyyyyyyyyyyyyyy'}
|
||||
Hello from California! 42 {'z': 126.0, 'x': 84, 'y': 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'}
|
||||
Hello from California! 0 {'z': 126.0, 'x': 84, 'y': 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'}
|
||||
... print wd.greet(), wd.get_secret_number(), wd.x, wd.y, wd.z
|
||||
... print wl.greet(), wl.get_secret_number(), wl.x, wl.y, wl.z
|
||||
Hello from California! 24 48 yyyyyyyyyyyyyyyyyyyyyyyy 72.0
|
||||
Hello from California! 24 48 yyyyyyyyyyyyyyyyyyyyyyyy 72.0
|
||||
Hello from California! 42 84 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 126.0
|
||||
Hello from California! 0 84 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 126.0
|
||||
'''
|
||||
|
||||
def run(args = None):
|
||||
|
||||
@@ -422,7 +422,7 @@ Some simple overloading tests:
|
||||
>>> try: r = Range('yikes')
|
||||
... except TypeError, e:
|
||||
... assert re.match(
|
||||
... 'No overloaded functions match [(]Range, string[)]\. Candidates are:\n.*\n.*',
|
||||
... 'No overloaded functions match [(]Range, str[a-z]*[)]\. Candidates are:\n.*\n.*',
|
||||
... str(e))
|
||||
... else: print 'no exception'
|
||||
|
||||
@@ -632,7 +632,7 @@ Testing overloaded free functions
|
||||
15
|
||||
>>> try: overloaded(1, 'foo')
|
||||
... except TypeError, err:
|
||||
... assert re.match("No overloaded functions match \(int, string\)\. Candidates are:",
|
||||
... assert re.match("No overloaded functions match \(int, str[a-z]*\)\. Candidates are:",
|
||||
... str(err))
|
||||
... else:
|
||||
... print 'no exception'
|
||||
@@ -662,7 +662,7 @@ Testing overloaded constructors
|
||||
5
|
||||
>>> try: over = OverloadTest(1, 'foo')
|
||||
... except TypeError, err:
|
||||
... assert re.match("No overloaded functions match \(OverloadTest, int, string\)\. Candidates are:",
|
||||
... assert re.match("No overloaded functions match \(OverloadTest, int, str[a-z]*\)\. Candidates are:",
|
||||
... str(err))
|
||||
... else:
|
||||
... print 'no exception'
|
||||
@@ -684,7 +684,7 @@ Testing overloaded methods
|
||||
5
|
||||
>>> try: over.overloaded(1,'foo')
|
||||
... except TypeError, err:
|
||||
... assert re.match("No overloaded functions match \(OverloadTest, int, string\)\. Candidates are:",
|
||||
... assert re.match("No overloaded functions match \(OverloadTest, int, str[a-z]*\)\. Candidates are:",
|
||||
... str(err))
|
||||
... else:
|
||||
... print 'no exception'
|
||||
|
||||
Reference in New Issue
Block a user