Example #1
0
    def test_error(self):
        def process_args(sys_argv, chooser=None, test_runner_stream=None, **kwargs):
            raise Error("test")

        sys_argv = []
        result = run_molt(sys_argv, configure_logging=self.logging.configure_logging,
                          process_args=process_args)
        self.assertEquals(result, 1)
        self.assertTrue(self.logging.argv is sys_argv)
Example #2
0
def main(sys_argv=sys.argv, from_source=False, **kwargs):
    """
    Arguments:

      from_source: whether this function is being called from a source
        checkout (e.g. by running `python test_molt.py` or
        `python -m molt.commands.molt`).

    """
    return run_molt(sys_argv=sys_argv, from_source=from_source, **kwargs)