Message166752
| Author |
ncoghlan |
| Recipients |
bkabrda, ncoghlan, nedbat, pitrou, serhiy.storchaka |
| Date |
2012年07月29日.12:37:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1343565441.94.0.991289324767.issue14803@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Nothing too complicated - just noting that a test suite like ours that launches Python subprocesses to test process global state handling could fairly easily arrange to pass appropriate -C options to trigger things like recording coverage data or profiling options.
I'll also note that if you put a "preinit.py" on sys.path (e.g. in the current directory if using -m for invocation), you could easily do "-C 'import preinit'" to do arbitrarily complex custom setups, including preconfiguring your test framework.
A lot of my thoughts on this come out of looking into migrating the various stdlib modules like trace, pdb and profile over to supporting everything that runpy (and hence the main executable) supports, and a lot of the complexity lies in the mechanics of how to daisy chain the two "__main__" modules together. Running a bit of extra code in __main__ as supplied on the command line before kicking off the full import process helps avoid a lot of pain. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月29日 12:37:21 | ncoghlan | set | recipients:
+ ncoghlan, pitrou, nedbat, serhiy.storchaka, bkabrda |
| 2012年07月29日 12:37:21 | ncoghlan | set | messageid: <1343565441.94.0.991289324767.issue14803@psf.upfronthosting.co.za> |
| 2012年07月29日 12:37:21 | ncoghlan | link | issue14803 messages |
| 2012年07月29日 12:37:21 | ncoghlan | create |
|