From 2523cdfdcd0c64e5f7c4601b78e13b520fcff10f Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Fri, 9 Apr 2021 10:35:21 +0200 Subject: [PATCH] Fix tests for Python 3.6, 3.7 and pypy --- tests/integration/test_main.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_main.py b/tests/integration/test_main.py index d584ad1..32c817a 100644 --- a/tests/integration/test_main.py +++ b/tests/integration/test_main.py @@ -1,6 +1,8 @@ """Integration tests for the main entrypoint of flake8.""" import json import os +import platform +import sys from unittest import mock import pytest @@ -183,10 +185,17 @@ def test_tokenization_error_but_not_syntax_error(tmpdir, capsys): _call_main(['t.py'], retv=1) out, err = capsys.readouterr() - assert out == '''\ + + expected = '''\ t.py:1:1: E902 TokenError: EOF in multi-line statement -t.py:1:8: E999 SyntaxError: unexpected EOF while parsing ''' + + expected += '''\ +t.py:1:8: E999 SyntaxError: unexpected EOF while parsing +''' if (platform.python_implementation() == "CPython" + and sys.version_info >= (3, 8)) else "" + + assert out == expected assert err == ''