Support «hosts: groupname[1:]» notation (~= 'the rest of the group')

This commit is contained in:
Abhijit Menon-Sen 2015-09-18 22:28:34 +05:30
parent 21142f5723
commit 2fcdb37e7b
3 changed files with 13 additions and 5 deletions

View file

@ -66,6 +66,9 @@ class TestInventory(unittest.TestCase):
'a[2:3]': [('a', (2, 3)), ['c', 'd']],
'a[-1]': [('a', (-1, None)), ['Z']],
'a[-2]': [('a', (-2, None)), ['Y']],
'a[48:]': [('a', (48, -1)), ['W', 'X', 'Y', 'Z']],
'a[49:]': [('a', (49, -1)), ['X', 'Y', 'Z']],
'a[1:]': [('a', (1, -1)), list(string.ascii_letters[1:])],
}
def setUp(self):