diff options
author | Steven Myint <git@stevenmyint.com> | 2015-07-10 07:17:51 -0700 |
---|---|---|
committer | Steven Myint <git@stevenmyint.com> | 2015-07-10 07:17:51 -0700 |
commit | bf62d389bdbe2085f765f648de536eb44979e448 (patch) | |
tree | ac8ccc39877d28863f5ad77d8ae73d49175253c4 | |
parent | 907e2da7aaa731236deec16a8323e80be7ae54f5 (diff) | |
download | pyflakes-bf62d389bdbe2085f765f648de536eb44979e448.tar.gz |
Fix a test under Python 3.5
-rw-r--r-- | pyflakes/test/test_api.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py index ad61983..a83a7fd 100644 --- a/pyflakes/test/test_api.py +++ b/pyflakes/test/test_api.py @@ -385,12 +385,18 @@ foo(bar=baz, bax) sourcePath = self.makeTempFile(source) last_line = ' ^\n' if sys.version_info >= (3, 2) else '' column = '13:' if sys.version_info >= (3, 2) else '' + + if sys.version_info >= (3, 5): + message = 'positional argument follows keyword argument' + else: + message = 'non-keyword arg after keyword arg' + self.assertHasErrors( sourcePath, ["""\ -%s:1:%s non-keyword arg after keyword arg +%s:1:%s %s foo(bar=baz, bax) -%s""" % (sourcePath, column, last_line)]) +%s""" % (sourcePath, column, message, last_line)]) def test_invalidEscape(self): """ |