summaryrefslogtreecommitdiff
path: root/test/units/inventory
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2017-05-30 19:05:19 +0200
committerJohn R Barker <john@johnrbarker.com>2017-05-30 18:05:19 +0100
commit4efec414e79b6f41caabae55027cb516c5965e9b (patch)
tree3523c0962a9f11e1b72de409a3883ca103244b9d /test/units/inventory
parent31c59ad5f9e3eb4ae369a33e79198a2aa2af8700 (diff)
downloadansible-4efec414e79b6f41caabae55027cb516c5965e9b.tar.gz
test/: PEP8 compliancy (#24803)
* test/: PEP8 compliancy - Make PEP8 compliant * Python3 chokes on casting int to bytes (#24952) But if we tell the formatter that the var is a number, it works
Diffstat (limited to 'test/units/inventory')
-rw-r--r--test/units/inventory/test_inventory.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/units/inventory/test_inventory.py b/test/units/inventory/test_inventory.py
index 126d09016d..be40ac03bf 100644
--- a/test/units/inventory/test_inventory.py
+++ b/test/units/inventory/test_inventory.py
@@ -29,6 +29,7 @@ from ansible.vars.manager import VariableManager
from units.mock.loader import DictDataLoader
+
class TestInventory(unittest.TestCase):
patterns = {
@@ -38,7 +39,7 @@ class TestInventory(unittest.TestCase):
' a,b ,c[1:2] ': ['a', 'b', 'c[1:2]'],
'9a01:7f8:191:7701::9': ['9a01:7f8:191:7701::9'],
'9a01:7f8:191:7701::9,9a01:7f8:191:7701::9': ['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9'],
- '9a01:7f8:191:7701::9,9a01:7f8:191:7701::9,foo': ['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9','foo'],
+ '9a01:7f8:191:7701::9,9a01:7f8:191:7701::9,foo': ['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9', 'foo'],
'foo[1:2]': ['foo[1:2]'],
'a::b': ['a::b'],
'a:b': ['a', 'b'],
@@ -51,7 +52,7 @@ class TestInventory(unittest.TestCase):
[['a', 'b'], ['a', 'b']],
[['a, b'], ['a', 'b']],
[['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9,foo'],
- ['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9','foo']]
+ ['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9', 'foo']]
]
# pattern_string: [ ('base_pattern', (a,b)), ['x','y','z'] ]
@@ -59,7 +60,7 @@ class TestInventory(unittest.TestCase):
# when applied to string.ascii_letters.
subscripts = {
- 'a': [('a',None), list(string.ascii_letters)],
+ 'a': [('a', None), list(string.ascii_letters)],
'a[0]': [('a', (0, None)), ['a']],
'a[1]': [('a', (1, None)), ['b']],
'a[2:3]': [('a', (2, 3)), ['c', 'd']],
@@ -143,9 +144,9 @@ class InventoryDefaultGroup(unittest.TestCase):
def _get_inventory(self, inventory_content):
- fake_loader = DictDataLoader({ __file__: inventory_content})
+ fake_loader = DictDataLoader({__file__: inventory_content})
- return InventoryManager(loader=fake_loader, sources=[__file__])
+ return InventoryManager(loader=fake_loader, sources=[__file__])
def _test_default_groups(self, inventory_content):
inventory = self._get_inventory(inventory_content)