Message42305
Logged In: YES
user_id=89016
OK, here's a new test_sys.py
> test_sys.py:
>
> - I agree that it's not worth testing the code
> paths that will invoke a custom __displayhook__ or
> __excepthook__, but I regret it nevertheless. :-)
> maybe this deserves a comment?
Testing a custom displayhook is now done (via compile(...,
"single")/exec). Testing a custom excepthook seems to be
trickier. This could probably be done by calling the
interpreter recursively via os.system() or os.popen(). I've
added a comment for now that this isn't tested.
Unfortunately this leaves a large block in
Python/pythonrun.c uncovered.
> - sys.exit() should also be callable with a string
OK, done.
> - you could check that the value of the SystemExit exception
> has the right exit code
Done.
- Have you checked this with Jython? I don't know if it
implements all
of these; in particular I doubt it has getrefcount().
I haven't tested Jython yet, but I guess test_sys.py will
have to many many exceptions for Jython. I'll try this tomorrow.
- I presume you've tested this on Windows?
Linux & Windows |
|
| Date |
User |
Action |
Args |
| 2007-08-23 15:19:35 | admin | link | issue662807 messages |
| 2007-08-23 15:19:35 | admin | create | |
|