Guido van Rossum
93018760bc
classic(), methods(): add another test relating to unbound methods:
...
when an unbound method of class A is stored as a class variable of
class B, and class B is *not* a subclass of class A, that method
should *not* get bound to B instances.
2001-08-17 13:40:47 +00:00
Guido van Rossum
7e1ff69271
Add early binding of methods to the 2nd metaclass example.
2001-08-17 11:55:58 +00:00
Guido van Rossum
309b566704
metaclass(): add tests for metaclasses written in Python: one that
...
subclasses type, one that doesn't (the latter isn't fully functional
yet).
2001-08-17 11:43:17 +00:00
Guido van Rossum
501c7c7d0e
classobject.c:instancemethod_descr_get(): when a bound method is
...
assigned to a class variable and then accessed via an instance, it
should not be rebound.
test_descr.py:methods(): test for the condition above.
2001-08-16 20:41:56 +00:00
Tim Peters
4d2dded044
test_descr started breaking in yet another way in the same place.
2001-08-16 19:50:51 +00:00
Tim Peters
63a8d69476
Repair some accidents causing Windows failures:
...
+ test_compare. While None compares less than anything else, it's not
always the case that None has the smallest id().
+ test_descr. The output of %p (pointer) formats varies across platforms.
In particular, on Windows it doesn't produce a leading "0x".
2001-08-16 16:56:16 +00:00
Guido van Rossum
a4ff6ab093
Add tests for overridable operators that have default interpretations
...
(__hash__ etc.), in static and dynamic classes, overridden and
default.
2001-08-15 23:57:59 +00:00
Guido van Rossum
b5a136b05d
Add a test to verify that bound methods work correctly.
2001-08-15 17:51:17 +00:00
Guido van Rossum
80e36750c8
Add a test for a weird bug I just discovered: a dynamic subclass
...
doesn't have a __dict__!
2001-08-14 20:00:33 +00:00
Guido van Rossum
d3077402c7
- Expand test for dynamic objects.
...
- Remove various 'global' directives and move some global definitions
inside the test functions that use them -- we have nested scopes so
the old hacks using globals are no longer needed.
2001-08-12 05:24:18 +00:00
Guido van Rossum
9d4fe4298e
dynamics(): add tests for dynamic *instances* (which are currently
...
broken). Also fix an invalid reference to C (should be S).
2001-08-12 03:38:18 +00:00
Guido van Rossum
e45763a8e6
Add test for SF bug #442833 (multiple inheritance).
2001-08-10 21:28:46 +00:00
Guido van Rossum
6d94627f1e
Allow AttributeError as well as TypeError for attribute-less objects.
2001-08-10 19:42:38 +00:00
Guido van Rossum
3720261729
Restore the test for 'object' that I removed when object was
...
uninstantiable. All is well now.
2001-08-09 19:45:21 +00:00
Guido van Rossum
15d86c6297
Remove the test for the 'object' type -- it can no longer be
...
instantiated. (Its use as a base class is adequately tested by other
tests.)
2001-08-07 16:53:42 +00:00
Tim Peters
6d6c1a35e0
Merge of descr-branch back into trunk.
2001-08-02 04:15:00 +00:00