From 54cb36f31fff5c9bab772f959385e1fb0f35a776 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Thu, 10 Mar 2016 09:30:53 -0800 Subject: [PATCH] adding another bad invocation test --- tests/test_driver.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_driver.py b/tests/test_driver.py index 3f72f89..ae3f1c2 100644 --- a/tests/test_driver.py +++ b/tests/test_driver.py @@ -435,5 +435,15 @@ class TestDriverScript(TestInventoryBase): exitcode = tldp.driver.run(argv) self.assertEquals(exitcode, os.EX_OK) + def test_script_bad_invocation(self): + c = self.config + c.script = False + self.add_published('Published-HOWTO', example.ex_linuxdoc) + inv = tldp.inventory.Inventory(c.pubdir, c.sourcedir) + with self.assertRaises(Exception) as ecm: + tldp.driver.script(c, inv.all.values()) + e = ecm.exception + self.assertTrue("neither --build nor --script" in e.message) + # # -- end of file