Commit Graph

6 Commits

Author SHA1 Message Date
Barry Warsaw c1e100f215 Additional tests for current, PEP described semantics:
- func.__dict__ is None until the first attribute is assigned

- del func.__dict__ is equivalent to func.__dict__ = None

- disallowing assignment to function attribute through unbound method
  (it was always illegal to assign through bound method).

- verifying that setting attribute explicitly on underlying function
  via meth.im_func is okay.
2001-02-26 18:07:26 +00:00
Tim Peters 10fb386399 Whitespace normalization. 2001-02-09 20:17:14 +00:00
Moshe Zadka 497671e094 The one thing I love more then writing code is deleting code.
* Removed func_hash and func_compare, so they can be treated as immutable
  content-less objects (address hash and comparison)
* Added tests to that affect to test_funcattrs (also testing func_code
  is writable)
* Reverse meaning of tests in test_opcodes which checked identical code
  gets identical functions
2001-01-29 06:21:17 +00:00
Barry Warsaw 2e9b396740 Add some regression tests of coredump bugs in funcobject.c 2.31. Also
added a test of a coredump that would occur when del'ing
func_defaults (put here for convenience).
2001-01-19 19:55:12 +00:00
Barry Warsaw 534c60f9ab Add a test case suggested by Guido, where a method is created with the
new module.
2001-01-15 21:00:02 +00:00
Barry Warsaw 4a420a0a75 Committing PEP 232, function attribute feature, approved by Guido.
Closes SF patch #103123.

Regression test for function attributes, with output file.
2001-01-15 20:30:15 +00:00