Message198072
| Author |
pitrou |
| Recipients |
asvetlov, benjamin.peterson, charettes, ezio.melotti, fabioz, gvanrossum, matthewlmcclure, matthewlmcclure-gmail, meador.inge, michael.foord, pitrou, python-dev, r.david.murray, rhettinger, terry.reedy, tim.peters, tomwardill |
| Date |
2013年09月19日.13:56:03 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1379598964.34.0.712557324226.issue11798@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
That said, I agree that the __dict__ proposal is a hack, but as is the current _removetestAtIndex mechanism.
The only clean solution I can think of would be to have two separate classes:
- a TestSpec which contains execution-independent data about a test case, and knows how to instantiate it
- a TestCase that is used for the actual test execution, but isn't saved in the test suite
Maybe it's possible to do this without any backwards compat problem by making TestSuite.__iter__ always return TestCases (but freshly-created ones, from the inner test specs). The main point of adaptation would be TestLoader.loadTestsFromTestCase(). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年09月19日 13:56:04 | pitrou | set | recipients:
+ pitrou, gvanrossum, tim.peters, rhettinger, terry.reedy, fabioz, benjamin.peterson, ezio.melotti, r.david.murray, michael.foord, matthewlmcclure, asvetlov, meador.inge, python-dev, tomwardill, matthewlmcclure-gmail, charettes |
| 2013年09月19日 13:56:04 | pitrou | set | messageid: <1379598964.34.0.712557324226.issue11798@psf.upfronthosting.co.za> |
| 2013年09月19日 13:56:04 | pitrou | link | issue11798 messages |
| 2013年09月19日 13:56:03 | pitrou | create |
|