Message339700
| Author | Peter de Blanc |
|---|---|
| Recipients | Peter de Blanc, ezio.melotti, michael.foord, rbcollins |
| Date | 2019-04-09.05:40:34 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1554788435.05.0.183130492369.issue36569@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
According to unittest docs: https://docs.python.org/3.7/library/unittest.html#module-unittest `setUpClass is called with the class as the only argument and must be decorated as a classmethod()` and: `tearDownClass is called with the class as the only argument and must be decorated as a classmethod()` However, I was able to create a passing test case where `setUpClass` and `tearDownClass` are decorated with `@staticmethod` instead of `@classmethod`: I tested this with Python versions 3.6.4 and 3.7.1. Please update the documentation to indicate that `@staticmethod` is allowed here, or else indicate why it's bad. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-04-09 05:40:35 | Peter de Blanc | set | recipients: + Peter de Blanc, rbcollins, ezio.melotti, michael.foord |
| 2019-04-09 05:40:35 | Peter de Blanc | set | messageid: <1554788435.05.0.183130492369.issue36569@roundup.psfhosted.org> |
| 2019-04-09 05:40:34 | Peter de Blanc | link | issue36569 messages |
| 2019-04-09 05:40:34 | Peter de Blanc | create | |