Thomas Wouters
a977329b6f
Merge part of the trunk changes into the p3yk branch. This merges from 43030
...
(branch-creation time) up to 43067. 43068 and 43069 contain a little
swapping action between re.py and sre.py, and this mightily confuses svn
merge, so later changes are going in separately.
This merge should break no additional tests.
The last-merged revision is going in a 'last_merge' property on '.' (the
branch directory.) Arbitrarily chosen, really; if there's a BCP for this, I
couldn't find it, but we can easily change it afterwards ;)
2006-04-21 09:43:23 +00:00
Guido van Rossum
d858f70617
Fix the problems in this test. Boy this is a painful thing to debug --
...
it's fundamentally unmaintainable. Should we throw away pyclbr, or rewrite
it using the AST?
2006-04-21 09:17:15 +00:00
Thomas Wouters
303de6a25b
Fix (and add test for) missing check for BaseException subclasses in the C
...
API.
2006-04-20 22:42:37 +00:00
Guido van Rossum
a48a3b42dd
Fix test failures for repr.py.
...
But shouldn't we kill this module? How many pprint clones do we need?
2006-04-20 16:07:39 +00:00
Thomas Wouters
08a1a9fac7
Use explicit relative import for an, ehm, relative import.
2006-04-18 21:41:36 +00:00
Guido van Rossum
7ea7d90dbe
Fix the expected output file; new classes just behave differently...
...
(There are some other problems with test_class.py that aren't as
easily fixed. :-( )
2006-04-17 23:38:13 +00:00
Thomas Wouters
07519f8712
Fix xrange tests now that xrange() (like many other places) no longer
...
silently converts floats to integers when expecting integer values.
2006-04-17 13:16:50 +00:00
Thomas Wouters
4cdada9af6
Make test_class work (but still fail) even though class.__dict__ is now a
...
'dictproxy' (which is a read-only non-dict mapping type that can't be passed
to exec.)
The failures the test finds are behavioural differences between old- and
new-style classes that may or may not be intended.
2006-04-15 09:19:16 +00:00
Thomas Wouters
1034dadf1f
Adjust test_enumerate to accomodate for iter() blowing up sooner than
...
expected, when dealing with new-style broken-iterators.
2006-04-15 09:16:16 +00:00
Thomas Wouters
c947123350
Fix tests for PyArg_Parse*; The PyArg_Parse functions no longer (noisily)
...
convert float arguments to integer-taking format characters, so fix the test
to expect the failure.
2006-04-15 09:15:11 +00:00
Thomas Wouters
725af87d0a
- Remove tests for classic class behaviour
...
- Expect a new-style class tree in the getclasstree test.
2006-04-15 09:13:19 +00:00
Thomas Wouters
1ae9afa829
Fix test_bisect in the same way as test_itertools: iter() blows up a lot
...
sooner for new-style broken-iterators, expect it to.
2006-04-15 09:12:14 +00:00
Thomas Wouters
34729030a7
Fix the superficial augmented-assignment tests to deal with true division.
...
Add (equally superficial) >>=/<<= test in the process. Relies on floats that
should be extremely close to the int '6' printing as '6.0', but I believe
that's a valid assumption ;P
2006-04-15 09:10:43 +00:00
Thomas Wouters
8690c4ed3f
Fix tests that were trying to make iteration blow up, on broken iterators.
...
Since the broken iterators are now new-style classes, iter() was able to do
the valid-iterator check sooner (on instantiation instead of on first call),
making the tests blow up sooner than expected.
2006-04-15 09:07:20 +00:00
Thomas Wouters
0725cf2127
Remove tests for classic-class and mixed-classic-class/new-style behaviour.
...
(New-style class behaviour was already thoroughly tested)
2006-04-15 09:04:57 +00:00
Thomas Wouters
28bc768977
- Fix doctest results to account for classes being new-style, and thus
...
printing differently.
- Fix doctest for classic-class behaviour, make it test new-style behaviour
on an implicitly-new-style class instead.
2006-04-15 09:03:16 +00:00
Neal Norwitz
c6fe059512
Use absolute import. (Should this go into 2.5?)
2006-03-24 08:57:54 +00:00
Neal Norwitz
bcc0db82dc
Get rid of remnants of integer division
2006-03-24 08:14:36 +00:00
Neal Norwitz
ed483ba63b
String exceptions are gone and so are classic classes.
2006-03-24 08:08:49 +00:00
Neal Norwitz
1e32b6927f
Must inherit from Exception now.
2006-03-24 08:02:35 +00:00
Neal Norwitz
c3e54b8480
Use *absolute* import now that it is required. (Should this go into 2.5? Hopefully not the bogus comment about using relative imports. That was just to see if anyone was paying attention.)
2006-03-24 07:38:37 +00:00
Neal Norwitz
16d6510425
Use relative import now that it is required. (Should this go into 2.5?)
2006-03-24 07:35:29 +00:00
Neal Norwitz
2a0c7801a5
Use relative import now that it is required. (Should this go into 2.5?)
2006-03-24 07:10:31 +00:00
Neal Norwitz
0fb43762d5
Must inherit from Exception now.
2006-03-24 07:02:16 +00:00
Neal Norwitz
ef4f7f0298
Use relative import now that it is required. (Should this go into 2.5?)
2006-03-24 06:59:24 +00:00
Neal Norwitz
914a81841f
Get doctest to pass. The problem was int/int -> float now. There
...
were some cases where an int was assumed.
Also had to change the string of the exception when dividing and int by zero.
Not sure what the best error message should be. Currently
5 / 0 yields the message: ZeroDivisionError: float division
That isn't entirely correct. But I'm not sure what else to do.
2006-03-22 09:20:30 +00:00
Neal Norwitz
bd2835c6ae
as is a keyword now :-)
2006-03-17 08:54:15 +00:00
Neal Norwitz
7096760b25
Get rid of xreadlines() (methods).
2006-03-17 08:29:44 +00:00
Neal Norwitz
d91085598f
Remove apply()
2006-03-17 08:00:19 +00:00
Neal Norwitz
ce96f69d69
Get rid of a bunch more raw_input references
2006-03-17 06:49:51 +00:00
Neal Norwitz
9e2b9665ae
Whoops, input *and* raw_input are slated for removal, and now both are gone.
2006-03-17 06:04:34 +00:00
Neal Norwitz
cd65e3fc7d
raw_input() -> input(). old input behavior is history (and test_builtin passes again). It was failing due to future division.
2006-03-17 05:59:16 +00:00
Guido van Rossum
45aecf451a
Checkpoint. 218 tests are okay; 53 are failing. Done so far:
...
- all classes are new-style (but ripping out classobject.[ch] isn't done)
- int/int -> float
- all exceptions must derive from BaseException
- absolute import
- 'as' and 'with' are keywords
2006-03-15 04:58:47 +00:00
Nick Coghlan
eadee9a744
Fix SF bug #1448804 and ad a test to ensure that all subscript operations continue to be handled correctly
2006-03-13 12:31:58 +00:00
Hye-Shik Chang
abb903fd54
Bug #1448490 : Fix a bug that ISO-2022 codecs could not handle
...
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:20:08 +00:00
Tim Peters
88ca467ca4
Whitespace normalization.
2006-03-10 23:39:56 +00:00
Tim Peters
922dd7d49d
When the new -w option (yay! great idea) reruns a
...
failed test, first display the name of the test (else
it's not always clear from the output which test is
getting run).
2006-03-10 23:37:10 +00:00
Martin v. Löwis
04824ce8ed
Add regrtest -w option.
2006-03-10 21:26:16 +00:00
Martin v. Löwis
4196296605
Update test data to 4.1; disable PRI #29 for now.
2006-03-10 11:59:47 +00:00
Guido van Rossum
f669436189
Um, I thought I'd already checked this in.
...
Anyway, this is the changes to the with-statement
so that __exit__ must return a true value in order
for a pending exception to be ignored.
The PEP (343) is already updated.
2006-03-10 02:28:35 +00:00
Martin v. Löwis
480f1bb67b
Update Unicode database to Unicode 4.1.
2006-03-09 23:38:20 +00:00
Georg Brandl
d09def36d5
Bug #1442874 : handle "<!>", the empty SGML comment
2006-03-09 13:27:14 +00:00
Thomas Heller
e317d0e307
Replace the trivial ctypes test (did only an import) with the real test suite.
2006-03-09 07:21:33 +00:00
Neal Norwitz
72c2c062d7
Try to be a bit more consistent on all platforms:
...
python .
python < .
both print a message, return non-zero and do not core dump.
2006-03-09 05:58:11 +00:00
Tim Peters
e8d09e5818
Whitespace normalization.
2006-03-09 01:15:05 +00:00
Thomas Heller
200af39722
Trivial test for ctypes, more to come
2006-03-08 20:38:11 +00:00
Georg Brandl
533ff6fc06
Patch #1434038 : property() now uses the getter's docstring if there is
...
no "doc" argument given. This makes it possible to legitimately use
property() as a decorator to produce a read-only property.
2006-03-08 18:09:27 +00:00
Tim Peters
df44ab7b1c
_hotshot hotshot_profiler(): If write_header() returned
...
an error code, this let `self` leak. This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.
test_hotshot test_bad_sys_path(): This new test provoked
the C bug above. This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
2006-03-07 23:53:32 +00:00
Guido van Rossum
38fff8c4e4
Checking in the code for PEP 357.
...
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
2006-03-07 18:50:55 +00:00
Barry Warsaw
d3c38ff7f8
SF patch #1443865 ; gc.get_count() added and optional argument 'generation'
...
added to gc.collect(). Updated docs, unit test, and NEWS entry.
(Also, fixed a typo in NEWS.)
2006-03-07 09:46:03 +00:00