willthames/ansible-lint — pull request #15 by msabramo (2014-07-02 17:33:15+00:00)
Title: Fix failing tests

Without this (using `master` branch):

```
❯ py.test --tb=short test/*.py
============================================================================= test session starts ==============================================================================
platform darwin -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2
collected 12 items

test/TestLintRule.py FF
test/TestRulesCollection.py .FFF
test/TestUtils.py ......

=================================================================================== FAILURES ===================================================================================
_________________________________________________________________________ TestRule.test_rule_matching __________________________________________________________________________
test/TestLintRule.py:16: in test_rule_matching
> matches = ematcher.matchlines(filename, text)
lib/ansiblelint/__init__.py:22: in matchlines
> result = self.match(file, line)
E TypeError: match() takes exactly 2 arguments (3 given)
_______________________________________________________________________ TestRule.test_rule_postmatching ________________________________________________________________________
test/TestLintRule.py:25: in test_rule_postmatching
> matches = rule.matchlines(filename, text)
lib/ansiblelint/__init__.py:22: in matchlines
> result = self.match(file, line)
E TypeError: match() takes exactly 2 arguments (3 given)
___________________________________________________________________ TestRulesCollection.test_run_collection ____________________________________________________________________
test/TestRulesCollection.py:17: in test_run_collection
> matches = self.rules.run('test/ematchtest.txt')
lib/ansiblelint/__init__.py:61: in run
> with open(playbookfile['path'], 'r') as f:
E TypeError: string indices must be integers, not str
______________________________________________________________________ TestRulesCollection.test_skip_tags ______________________________________________________________________
test/TestRulesCollection.py:33: in test_skip_tags
> matches = self.rules.run('test/ematchtest.txt', skip_tags=['test1'])
lib/ansiblelint/__init__.py:61: in run
> with open(playbookfile['path'], 'r') as f:
E TypeError: string indices must be integers, not str
________________________________________________________________________ TestRulesCollection.test_tags _________________________________________________________________________
test/TestRulesCollection.py:21: in test_tags
> matches = self.rules.run('test/ematchtest.txt', tags=['test1'])
lib/ansiblelint/__init__.py:61: in run
> with open(playbookfile['path'], 'r') as f:
E TypeError: string indices must be integers, not str
====================================================================== 5 failed, 7 passed in 0.20 seconds ======================================================================
```

With this:

```
$ py.test --tb=short test/*.py
============================================================================= test session starts ==============================================================================
platform darwin -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2
collected 12 items

test/TestLintRule.py ..
test/TestRulesCollection.py ....
test/TestUtils.py ......

========================================================================== 12 passed in 0.16 seconds ===========================================================================
```