schrodinger.test.ioredirect module¶
- schrodinger.test.ioredirect.replace_output_logger_stream(stream)¶
Replace the stream used by output loggers.
- class schrodinger.test.ioredirect.IORedirect(stdout, stderr)¶
Bases:
object
Use to redirect stderr & stdout.
- __init__(stdout, stderr)¶
- class schrodinger.test.ioredirect.IOCapture¶
Bases:
schrodinger.test.ioredirect.IORedirect
Use to redirect stderr & stdout to a StringIO object.
- __init__()¶
- class schrodinger.test.ioredirect.IOSilence¶
Bases:
object
A context manager for doing a “deep suppression” of stdout and stderr, which will point the file descriptors to devnull.
Useful for cases where C/Fortran code does not use mmerr and there is an expected error message.
- __init__()¶
- class schrodinger.test.ioredirect.FullIORedirect¶
Bases:
schrodinger.test.ioredirect.IOSilence
Context manager returns an IOString with all output from stderr/stdout.
Because of output from c / python, this output may not be in the correct order. This is indeed to be used to verify certain messages from errors, in tests only.
- __init__()¶