diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 7bee1e64..75c1c0b0 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -3,6 +3,8 @@ Test the typing library, with docstrings. This is needed since annotations are not supported in python 2.7 else then annotating by comment (and this is still TODO at 2016-01-23) """ +# There's no Python 2.6 typing module. +# python >= 2.7 import typing class B: pass diff --git a/test/run.py b/test/run.py index 943a824e..33a346df 100755 --- a/test/run.py +++ b/test/run.py @@ -249,14 +249,16 @@ def skip_python_version(line): map(int, match.group(2).split("."))) operation = getattr(operator, comp_map[match.group(1)]) if not operation(sys.version_info, minimal_python_version): - return "Minimal python version %s" % match.group(1) + return "Minimal python version %s %s" % (match.group(1), match.group(2)) return None -def collect_file_tests(lines, lines_to_execute): - makecase = lambda t: IntegrationTestCase(t, correct, line_nr, column, - start, line, path=None, skip=skip) +def collect_file_tests(path, lines, lines_to_execute): + def makecase(t): + return IntegrationTestCase(t, correct, line_nr, column, + start, line, path=path, skip=skip) + start = None correct = None test_type = None @@ -325,9 +327,8 @@ def collect_dir_tests(base_dir, test_files, check_thirdparty=False): else: source = unicode(open(path).read(), 'UTF-8') - for case in collect_file_tests(StringIO(source), + for case in collect_file_tests(path, StringIO(source), lines_to_execute): - case.path = path case.source = source if skip: case.skip = skip