summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2013-11-12 19:03:19 -0700
committerAaron Meurer <asmeurer@gmail.com>2013-11-12 19:03:19 -0700
commita8a6796a25a037253706f3e1a82a9465f23d8eeb (patch)
tree57384d6472c76355ee3ed77630c6d63aa07c5f2a
parent02b2f9bd20d2a79595c330c69794eb915320768b (diff)
downloadpyflakes-a8a6796a25a037253706f3e1a82a9465f23d8eeb.tar.gz
Make tests pass in Python 2
-rw-r--r--pyflakes/test/test_api.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
index e090eb6..856121c 100644
--- a/pyflakes/test/test_api.py
+++ b/pyflakes/test/test_api.py
@@ -351,12 +351,13 @@ def foo(bar=baz, bax):
"""
sourcePath = self.makeTempFile(source)
last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
+ column = '7:' if sys.version_info >= (3, 2) else ''
self.assertHasErrors(
sourcePath,
["""\
-%s:1:7: non-default argument follows default argument
+%s:1:%s non-default argument follows default argument
def foo(bar=baz, bax):
-%s""" % (sourcePath, last_line)])
+%s""" % (sourcePath, column, last_line)])
def test_nonKeywordAfterKeywordSyntaxError(self):
"""
@@ -369,12 +370,13 @@ foo(bar=baz, bax)
"""
sourcePath = self.makeTempFile(source)
last_line = ' ^\n' if sys.version_info >= (3, 2) else ''
+ column = '12:' if sys.version_info >= (3, 2) else ''
self.assertHasErrors(
sourcePath,
["""\
-%s:1:12: non-keyword arg after keyword arg
+%s:1:%s non-keyword arg after keyword arg
foo(bar=baz, bax)
-%s""" % (sourcePath, last_line)])
+%s""" % (sourcePath, column, last_line)])
def test_invalidEscape(self):
"""