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 | danderson |
|---|---|
| Recipients | danderson |
| Date | 2008年04月19日.22:09:31 |
| SpamBayes Score | 0.010532936 |
| Marked as misclassified | No |
| Message-id | <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Some test cases in Lib/test/mapping_tests.py are problematic for users wishing to test their own implementations of the mapping protocol: - TestHashMappingProtocol.test_repr() requires the user implementations to look like a dict when repr() is applied. It is unclear why this is required of conforming mapping protocol implementations. - TestMappingProtocol.test_fromkeys() cannot pass for any implementation that uses its constructor in fromkeys(), because baddict1 defines a constructor accepting no arguments. It should accept *args, **kwargs to be sane for user implementations that handle passing data sources to the constructor. - TestHashMappingProtocol.test_mutatingiteration(), for some faulty implementations, makes the iteration degrade into an infinite loop. Making the test more strict (eg. keeping an explicit iteration count and failing if it goes >1) would be more helpful to buggy implementations. These all seem like trivial issues. If it is agreed that the repr_test should be removed from the ABC tests, I can provide a patch implementing these three corrections. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年04月19日 22:09:33 | danderson | set | spambayes_score: 0.0105329 -> 0.010532936 recipients: + danderson |
| 2008年04月19日 22:09:33 | danderson | set | spambayes_score: 0.0105329 -> 0.0105329 messageid: <1208642973.7.0.825847798287.issue2661@psf.upfronthosting.co.za> |
| 2008年04月19日 22:09:32 | danderson | link | issue2661 messages |
| 2008年04月19日 22:09:31 | danderson | create | |