diff --git a/test/TestInventory.py b/test/TestInventory.py index 7e442716ddd..1fddfc73cd5 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -274,6 +274,11 @@ class TestInventory(unittest.TestCase): def test_invalid_range(self): Inventory(os.path.join(self.test_dir, 'inventory','test_incorrect_range')) + @raises(errors.AnsibleError) + def test_missing_end(self): + Inventory(os.path.join(self.test_dir, 'inventory','test_missing_end')) + + ################################################### ### Inventory API tests diff --git a/test/inventory/test_missing_end b/test/inventory/test_missing_end new file mode 100644 index 00000000000..ff320424022 --- /dev/null +++ b/test/inventory/test_missing_end @@ -0,0 +1,2 @@ +[test] +host[1:]