From 2fddd0c69948eb51124e3fbc317a2d28aeb2d978 Mon Sep 17 00:00:00 2001 From: quartox Date: Mon, 22 May 2017 18:50:04 -0700 Subject: [PATCH] Split on ' # ' for check tests --- mypy/test/data.py | 2 +- test-data/unit/check-abstract.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy/test/data.py b/mypy/test/data.py index a0573d55479c..cf4a4d6f14b8 100644 --- a/mypy/test/data.py +++ b/mypy/test/data.py @@ -383,7 +383,7 @@ def expand_errors(input: List[str], output: List[str], fnam: str) -> None: for i in range(len(input)): # The first in the split things isn't a comment - for possible_err_comment in input[i].split('#')[1:]: + for possible_err_comment in input[i].split(' # ')[1:]: m = re.search( '^([ENW]):((?P\d+):)? (?P.*)$', possible_err_comment.strip()) diff --git a/test-data/unit/check-abstract.test b/test-data/unit/check-abstract.test index 2de9d129436b..9a0d4afc5971 100644 --- a/test-data/unit/check-abstract.test +++ b/test-data/unit/check-abstract.test @@ -154,7 +154,7 @@ class A(metaclass=ABCMeta): @abstractmethod def g(self): pass class B(A): pass -B()# E: Cannot instantiate abstract class 'B' with abstract attributes 'f' and 'g' +B() # E: Cannot instantiate abstract class 'B' with abstract attributes 'f' and 'g' [out] [case testInstantiationAbstractsInTypeForFunctions]