This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author torsten
Recipients abarry, torsten
Date 2015-11-28.09:42:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448703754.59.0.587173583071.issue25757@psf.upfronthosting.co.za>
In-reply-to
Content
Prompted by Emanuel's comment I ran the test with repetitions. This does not actually test his assertion that I missed a decref since he referred to the error case when setting the __doc__ key of the instance dict fails. But I was curious none the less.

I was shocked that this failed with

```
torsten@defiant:~/mirror/cpython$ make test TESTOPTS="-R 3:2 test_property"
...
test test_property failed -- Traceback (most recent call last):
  File "/home/torsten/mirror/cpython/Lib/test/test_property.py", line 172, in test_property_decorator_doc_writable
    self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
AssertionError: 'Spam' != 'Eggs'
```

But this was not introduced by my changes, rather it is an existing bug in the tests: test_property_decorator_doc_writable modifies a class created on module level so the second repetition sees the already updated class.

fix_repetitions.diff contains a fix for this problem (by defining the class locally in the test method).

While at it I introduced a refleak on purpose and this is correctly reported by the tests. Good to know how to test for this :-)
History
Date User Action Args
2015-11-28 09:42:34torstensetrecipients: + torsten, abarry
2015-11-28 09:42:34torstensetmessageid: <1448703754.59.0.587173583071.issue25757@psf.upfronthosting.co.za>
2015-11-28 09:42:34torstenlinkissue25757 messages
2015-11-28 09:42:33torstencreate