mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
This commit is contained in:
parent
9ada3d6e29
commit
49fd7fa443
640 changed files with 52240 additions and 18408 deletions
|
@ -604,8 +604,8 @@ DocTestFinder finds the line number of each example:
|
|||
... >>> for x in range(10):
|
||||
... ... print x,
|
||||
... 0 1 2 3 4 5 6 7 8 9
|
||||
... >>> x/2
|
||||
... 6.0
|
||||
... >>> x//2
|
||||
... 6
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
>>> [e.lineno for e in test.examples]
|
||||
|
@ -679,8 +679,8 @@ statistics. Here's a simple DocTest case we can use:
|
|||
... >>> x = 12
|
||||
... >>> print x
|
||||
... 12
|
||||
... >>> x/2
|
||||
... 6.0
|
||||
... >>> x//2
|
||||
... 6
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
|
||||
|
@ -700,8 +700,8 @@ the failure and proceeds to the next example:
|
|||
... >>> x = 12
|
||||
... >>> print x
|
||||
... 14
|
||||
... >>> x/2
|
||||
... 6.0
|
||||
... >>> x//2
|
||||
... 6
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
>>> doctest.DocTestRunner(verbose=True).run(test)
|
||||
|
@ -723,9 +723,9 @@ the failure and proceeds to the next example:
|
|||
Got:
|
||||
12
|
||||
Trying:
|
||||
x/2
|
||||
x//2
|
||||
Expecting:
|
||||
6.0
|
||||
6
|
||||
ok
|
||||
(1, 3)
|
||||
"""
|
||||
|
@ -738,8 +738,8 @@ output:
|
|||
... >>> x = 12
|
||||
... >>> print x
|
||||
... 12
|
||||
... >>> x/2
|
||||
... 6.0
|
||||
... >>> x//2
|
||||
... 6
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
|
||||
|
@ -754,9 +754,9 @@ output:
|
|||
12
|
||||
ok
|
||||
Trying:
|
||||
x/2
|
||||
x//2
|
||||
Expecting:
|
||||
6.0
|
||||
6
|
||||
ok
|
||||
(0, 3)
|
||||
|
||||
|
@ -784,9 +784,9 @@ iff `-v` appears in sys.argv:
|
|||
12
|
||||
ok
|
||||
Trying:
|
||||
x/2
|
||||
x//2
|
||||
Expecting:
|
||||
6.0
|
||||
6
|
||||
ok
|
||||
(0, 3)
|
||||
|
||||
|
@ -806,9 +806,9 @@ replaced with any other string:
|
|||
>>> def f(x):
|
||||
... '''
|
||||
... >>> x = 12
|
||||
... >>> print x/0
|
||||
... >>> print x//0
|
||||
... Traceback (most recent call last):
|
||||
... ZeroDivisionError: float division
|
||||
... ZeroDivisionError: integer division or modulo by zero
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
>>> doctest.DocTestRunner(verbose=False).run(test)
|
||||
|
@ -822,10 +822,10 @@ unexpected exception:
|
|||
>>> def f(x):
|
||||
... '''
|
||||
... >>> x = 12
|
||||
... >>> print 'pre-exception output', x/0
|
||||
... >>> print 'pre-exception output', x//0
|
||||
... pre-exception output
|
||||
... Traceback (most recent call last):
|
||||
... ZeroDivisionError: float division
|
||||
... ZeroDivisionError: integer division or modulo by zero
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
>>> doctest.DocTestRunner(verbose=False).run(test)
|
||||
|
@ -833,10 +833,10 @@ unexpected exception:
|
|||
**********************************************************************
|
||||
File ..., line 4, in f
|
||||
Failed example:
|
||||
print 'pre-exception output', x/0
|
||||
print 'pre-exception output', x//0
|
||||
Exception raised:
|
||||
...
|
||||
ZeroDivisionError: float division
|
||||
ZeroDivisionError: integer division or modulo by zero
|
||||
(1, 2)
|
||||
|
||||
Exception messages may contain newlines:
|
||||
|
@ -920,7 +920,7 @@ unexpected exception:
|
|||
|
||||
>>> def f(x):
|
||||
... r'''
|
||||
... >>> 1/0
|
||||
... >>> 1//0
|
||||
... 0
|
||||
... '''
|
||||
>>> test = doctest.DocTestFinder().find(f)[0]
|
||||
|
@ -929,11 +929,11 @@ unexpected exception:
|
|||
**********************************************************************
|
||||
File ..., line 3, in f
|
||||
Failed example:
|
||||
1/0
|
||||
1//0
|
||||
Exception raised:
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ZeroDivisionError: float division
|
||||
ZeroDivisionError: integer division or modulo by zero
|
||||
(1, 1)
|
||||
"""
|
||||
def optionflags(): r"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue