Issue36201
Created on 2019-03-06 00:42 by walterqian, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg337248 - (view) | Author: Walter Qian (walterqian) | Date: 2019-03-06 00:42 | |
For dictionaries of dictionaries unittest.util._count_diff_all_purpose does not work correctly. It should recursively call itself when it encounters another dictionary. |
|||
| msg337268 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2019-03-06 01:56 | |
I believe this is outside the scope of what intended. For the most part, the test methods need to be as direct and non-magical as possible so that we're clear on what is being tested. Another issue with built in recursion is that different people have different notions of what is atomic, different notions of search order (depth first, breadth first, pre-order, in-order, post-order, etc), and different notions on maximum depth etc. The unittest module leaves those decisions to the tester and instead focuses on simple and direct properties of objects under test. |
|||
| msg337271 - (view) | Author: Lisa Roach (lisroach) * ![]() |
Date: 2019-03-06 02:28 | |
I agree with Raymond, I think this might end up complicating things too much. It is common in the unit test library to only recurse one level deep and not assume too much about the intentions of the tester. |
|||
| msg378840 - (view) | Author: Irit Katriel (iritkatriel) * ![]() |
Date: 2020-10-17 22:51 | |
Should this be closed as won't fix? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:12 | admin | set | github: 80382 |
| 2020-10-18 03:55:12 | rhettinger | set | status: open -> closed resolution: rejected stage: resolved |
| 2020-10-17 22:51:58 | iritkatriel | set | nosy:
+ iritkatriel messages: + msg378840 |
| 2019-03-06 14:37:01 | vstinner | set | nosy:
- vstinner |
| 2019-03-06 02:28:17 | lisroach | set | messages: + msg337271 |
| 2019-03-06 01:56:04 | rhettinger | set | assignee: michael.foord messages:
+ msg337268 |
| 2019-03-06 00:42:33 | walterqian | create | |
