def test_main_options(self):
        # Test with no main options
        result = LineGrab.main(argv=None)
        self.assertEquals(2, result)

        # Verify that main run with the testing option auto-closes the
        # application
        result = LineGrab.main(["unittest", "-s", "simulation", "-t"])
        self.assertEquals(0, result)
    def test_main_options(self):
        # Test with no main options
        result = LineGrab.main(argv=None)
        self.assertEquals(2, result)

        # Verify that main run with the testing option auto-closes the
        # application
        result = LineGrab.main(["unittest", 
                                "-s", "simulation", "-t"])
        self.assertEquals(0, result)
    def test_log_file_created_auto_close(self):
        # To use this test, make sure --nologcapture is on
        return
        self.assertTrue(os.path.isfile(self.log_filename))
        orig_size = os.path.getsize(self.log_filename)

        result = LineGrab.main(["unittest exec", "-t"])

        new_size = os.path.getsize(self.log_filename)
        self.assertGreater(new_size, orig_size)
    def test_log_file_created_auto_close(self):
        # To use this test, make sure --nologcapture is on
        return
        self.assertTrue(os.path.isfile(self.log_filename))
        orig_size = os.path.getsize(self.log_filename)

        result = LineGrab.main(["unittest exec", "-t"])

        new_size = os.path.getsize(self.log_filename)
        self.assertGreater(new_size, orig_size)