summaryrefslogtreecommitdiffstats
path: root/Lib/test/output/test_coercion
Commit message (Collapse)AuthorAgeFilesLines
* Make test_coercion.py less sensitive to platform fp quirks. ClosesNeil Schemenauer2004-03-101-329/+329
| | | | SF bug #678265.
* Match new sequence behavior. User defined types now behave better as andNeil Schemenauer2002-12-301-2/+2
| | | | with sequences.
* Generalize tuple() to work nicely with iterators.Tim Peters2001-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | NEEDS DOC CHANGES. This one surprised me! While I expected tuple() to be a no-brainer, turns out it's actually dripping with consequences: 1. It will *allow* the popular PySequence_Fast() to work with any iterable object (code for that not yet checked in, but should be trivial). 2. It caused two std tests to fail. This because some places used PyTuple_Sequence() (the C spelling of tuple()) as an indirect way to test whether something *is* a sequence. But tuple() code only looked for the existence of sq->item to determine that, and e.g. an instance passed that test whether or not it supported the other operations tuple() needed (e.g., __len__). So some things the tests *expected* to fail with an AttributeError now fail with a TypeError instead. This looks like an improvement to me; e.g., test_coercion used to produce 559 TypeErrors and 2 AttributeErrors, and now they're all TypeErrors. The error details are more informative too, because the places calling this were *looking* for TypeErrors in order to replace the generic tuple() "not a sequence" msg with their own more specific text, and AttributeErrors snuck by that.
* Sequence repeat works now for in-place multiply with an integer typeNeil Schemenauer2001-01-041-4/+4
| | | | as the left operand. I don't know if this is a feature or a bug.
* Use numbers that can be accurately represented on binary machines. I hopeNeil Schemenauer2001-01-031-585/+585
| | | | this works on all platforms.
* Add more tests for compare and coercion in preparation for the coercionNeil Schemenauer2001-01-021-0/+1054
overhaul. Closes SF patch #102878.