]> granicus.if.org Git - python/commit
- Some tests that check that assignments are not allowed expect this
authorGuido van Rossum <guido@python.org>
Tue, 18 Sep 2001 03:28:54 +0000 (03:28 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 18 Sep 2001 03:28:54 +0000 (03:28 +0000)
commitbd131497112da319c4361c3e8656b5b7055011e3
treecd105d1367b632c80c19f211a83820c2f6c125fc
parent427ce80df6445a4fae34b414e33b6dc84b615f95
- Some tests that check that assignments are not allowed expect this
  to raise TypeError.  In practice, a disallowed attribute assignment
  can raise either TypeError or AttributeError (and it's unclear which
  is better).  So allow either.  (Yes, this is in anticipation of a
  code change that switches the exception raised. :-)

- Add a utility function, cantset(), which verifies that setting a
  particular attribute to a given value is disallowed, and also that
  deleting that same attribute is disallowed.  Use this in the
  test_func_*() tests.

- Add a new set of tests that test conformance of various instance
  method attributes.  (Also in anticipation of code that changes their
  implementation.)
Lib/test/test_funcattrs.py