From 4f69b63fec02b2a1a4abedc49eafa0d14d4807dc Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 23 Aug 2013 12:51:17 +0200 Subject: [PATCH] add test for incorrect format in range host --- test/TestInventory.py | 4 ++++ test/inventory/test_incorrect_format | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 test/inventory/test_incorrect_format diff --git a/test/TestInventory.py b/test/TestInventory.py index 1fddfc73cd..53c8107467 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -278,6 +278,10 @@ class TestInventory(unittest.TestCase): def test_missing_end(self): Inventory(os.path.join(self.test_dir, 'inventory','test_missing_end')) + @raises(errors.AnsibleError) + def test_incorrect_format(self): + Inventory(os.path.join(self.test_dir, 'inventory','test_incorrect_format')) + ################################################### ### Inventory API tests diff --git a/test/inventory/test_incorrect_format b/test/inventory/test_incorrect_format new file mode 100644 index 0000000000..339bd59edf --- /dev/null +++ b/test/inventory/test_incorrect_format @@ -0,0 +1,2 @@ +[test] +host[001:10]