summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
Commit message (Collapse)AuthorAgeFilesLines
* Use descriptors.Guido van Rossum2005-01-161-2/+2
|
* Removing tests that fail because of changes in PyString_InternInPlace(),Armin Rigo2004-08-071-16/+0
| | | | | as discussed on IRC. The equivalent tests for the new behavior are in test_builtin.py.
* Ensure super() lookup of descriptor from classmethod works (SF #743627)Phillip J. Eby2004-03-251-0/+14
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-14/+14
| | | | From SF patch #852334.
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Fix forMichael W. Hudson2003-08-151-0/+31
| | | | | | | | | [ 784825 ] fix obscure crash in descriptor handling Should be applied to release23-maint and in all likelyhood release22-maint, too. Certainly doesn't apply to release21-maint.
* Repair refcounting on error return from type_set_bases.Michael W. Hudson2003-08-071-0/+7
| | | | Include a test case that failed for one of my efforts to repair this.
* SF bug #762455: Python segfaults when sys.stdout is changed in getattrRaymond Hettinger2003-06-291-0/+15
| | | | * Added unittest that fails before, but not after Neil's fix to ceval.c.
* SF bug #753451: classmethod abuse --> SystemErrorRaymond Hettinger2003-06-181-0/+8
| | | | | | Check the argument to classmethod for callability. Backport candidate.
* Add test for bug #751998.Neal Norwitz2003-06-161-0/+16
|
* Remove debug code from weakref_segfault().Guido van Rossum2003-05-291-2/+0
|
* Add testcase for SF 742911.Guido van Rossum2003-05-291-0/+24
|
* - super() no longer ignores data descriptors, except __class__. SeeGuido van Rossum2003-04-161-1/+16
| | | | | the thread started at http://mail.python.org/pipermail/python-dev/2003-April/034338.html
* Ouch, it's Carlo Verre, not Verre Carlo.Guido van Rossum2003-04-151-5/+5
|
* Close off the "Verre Carlo hack" as discussed on python-dev.Guido van Rossum2003-04-141-0/+17
|
* SF bug #699934: Obscure error messageRaymond Hettinger2003-04-061-3/+2
| | | | | mwh pointed out that the error message did not make sense if obtained by rearranging the bases.
* SF bug #699934: Obscure error messageRaymond Hettinger2003-03-121-3/+7
| | | | Clarify error message for mro conflicts.
* Use floor division (// and __[r]floordiv__ in right-dispatch test.Guido van Rossum2003-02-271-23/+23
|
* Whitespace normalization.Tim Peters2003-02-191-1/+1
|
* SF patch #685738 by Michael Stone.Guido van Rossum2003-02-131-8/+8
| | | | | | | This changes the default __new__ to refuse arguments iff tp_init is the default __init__ implementation -- thus making it a TypeError when you try to pass arguments to a constructor if the class doesn't override at least __init__ or __new__.
* Implement another useful feature for proxies: in super(X, x), x mayGuido van Rossum2003-02-121-0/+39
| | | | now be a proxy for an X instance, as long as issubclass(x.__class__, X).
* SF #532767: isinstance(x, X) should work when x is a proxy for an XGuido van Rossum2003-02-121-1/+29
| | | | | instance, as long as x.__class__ is X or a subclass thereof. Did a little cleanup of PyObject_IsInstance() too.
* Put proper tests in classmethod_get(). Remove the type argument toGuido van Rossum2003-02-111-0/+40
| | | | | | descr_check(); it wasn't useful. Change the type argument of the various _get() methods to PyObject * because the call signature of tp_descr_get doesn't guarantee its type.
* Get rid of the "bozo" __getstate__ that was inserted when __slots__Guido van Rossum2003-02-101-18/+17
| | | | | | was used. This simplifies some logic in copy_reg.py (used by pickling). It also broke a test, but this was rewritten to test the new feature. :-)
* Fix SF bug #683467, 'int' ability to generate longs not inheritedNeal Norwitz2003-02-101-0/+8
| | | | | | When subclassing from an int but not overriding __new__, long values were not converted properly. Try to convert longs into an int.
* Add __getnewargs__ method to classes that need it.Guido van Rossum2003-02-071-0/+4
| | | | (Yes, this is an incompatibility. I'll document it in PEP 307.)
* Fix SF bug #667147, Segmentation fault printing str subclassNeal Norwitz2003-01-131-1/+24
| | | | | | | Fix infinite recursion which occurred when printing an object whose __str__() returned self. Will backport
* Fix for SF bug #642358: only provide a new with a __dict__ orGuido van Rossum2003-01-071-0/+14
| | | | | __weaklist__ descriptor if we added __dict__ or __weaklist__, respectively. With unit test.
* Add a test for a feature added in rev. 2.82 of typeobject.c:Guido van Rossum2003-01-061-0/+53
| | | | | | | | | | | | | | - SLOT1BINFULL() macro: changed this to check for __rop__ overriding __op__, like binary_op1() in abstract.c -- the latter only calls the slot function once if both types use the same slot function, so the slot function must make both calls -- which it already did for the __op__, __rop__ order, but not yet for the __rop__, __op__ order when B.__class__ is a subclass of A.__class__. Also test the refinement added in rev. 2.201 that fixes the problem reported in SF bug #623669. Also test a similar provision in abstract.c's binary_op1().
* Add some print statements in verbose mode to announce that the newestGuido van Rossum2003-01-061-0/+8
| | | | | tests are run. (All tests in this module should have one of these at the top.)
* Disable the rexec test now that rexec is out of grace.Guido van Rossum2003-01-061-0/+2
|
* Whitespace normalization.Tim Peters2002-12-241-5/+5
|
* Add test for SF #658106. Will backport.Neal Norwitz2002-12-241-0/+4
|
* Tighten the tests for assignment to __bases__: disallow empty tuple.Guido van Rossum2002-12-131-0/+8
|
* SF 548651: Fix the METH_CLASS implementation.Tim Peters2002-12-091-4/+4
| | | | | | | Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
* Nudge getting __module__ and __name__ for new-style classes so thatMichael W. Hudson2002-11-271-1/+9
| | | | | | | the results of *setting* __name__ are not so surprising. If people can suggest more tests, that'd be grand, or is what's there sufficient?
* I don't know why staring at the email to python-checkins made meMichael W. Hudson2002-11-271-0/+2
| | | | | | | see problems with my code that I didn't see before the checkin, but: When a subtype .mro() fails, we need to reset the type whose __bases__ are being changed, too. Fix + test.
* Readjustments to the way we cope with exceptions from subclasses'Michael W. Hudson2002-11-271-2/+79
| | | | | | mro() methods. Now any exception aborts the whole __bases__ change. And more tests.
* I had the inheritance cycle stuff backwards. Oops!Michael W. Hudson2002-11-271-0/+8
|
* The MRO conflict error message depends on dictionary hash order.Guido van Rossum2002-11-271-4/+4
| | | | Avoid depending on this in the test.
* This is my patch:Michael W. Hudson2002-11-261-0/+89
| | | | | | | | | | | | [ 635933 ] make some type attrs writable Plus a couple of extra tests beyond what's up there. It hasn't been as carefully reviewed as it perhaps should, so all readers are encouraged, nay exhorted, to give this a close reading. There are still a couple of oddities related to assigning to __name__, but I intend to solicit python-dev's opinions on these.
* A tweaked version of Jeremy's patch #642489, to produce better errorGuido van Rossum2002-11-251-0/+31
| | | | | messages about MRO conflicts. (Tweaks here: don't print the message, but compare it with an expected string.)
* Remove duplicate testNeal Norwitz2002-11-231-2/+0
|
* Patch #642500 with slight modifications: allow keyword arguments inJust van Rossum2002-11-231-11/+12
| | | | | | | dict() constructor. Example: >>> dict(a=1, b=2) {'a': 1, 'b': 2} >>>
* Fix or disable some tests that were affected by the new C3 MROGuido van Rossum2002-11-141-20/+79
| | | | algorithm, and add some new tests for the C3 algorithm.
* Fix SF # 624982, Potential AV in slot_sq_item, by Greg ChapmanNeal Norwitz2002-10-181-0/+12
| | | | Don't crash when getting value of a property raises an exception
* For some reason (probably cut and paste), __ipow__ for new-styleGuido van Rossum2002-10-151-0/+11
| | | | | | | | | | | | | | classes was called with three arguments. This makes no sense, there's no way to pass in the "modulo" 3rd argument as for __pow__, and classic classes don't do this. [SF bug 620179] I don't want to backport this to 2.2.2, because it could break existing code that has developed a work-around. Code in 2.2.2 that wants to use __ipow__ and wants to be forward compatible with 2.3 should be written like this: def __ipow__(self, exponent, modulo=None): ...
* Code by Inyeol Lee, submitted to SF bug 595350, to implementGuido van Rossum2002-08-231-4/+0
| | | | | the string/unicode method .replace() with a zero-lengt first argument. Inyeol contributed tests for this too.
* Add tests for including __dict__ and/or __weakref__ in __slots__.Guido van Rossum2002-08-131-1/+50
| | | | Add some more rigor to slotmultipleinheritance().
* Add test for SF bug # 575229, multiple inheritance w/ slots dumps coreNeal Norwitz2002-08-131-0/+11
| | | | Fix already checked in by Guido