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]