Skip to content

testcheck: Automated detection of .test files #8650 #11453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 5 additions & 75 deletions mypy/test/testcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import re
import sys
from pathlib import Path

from typing import Dict, List, Set, Tuple

Expand All @@ -23,81 +24,10 @@


# List of files that contain test case descriptions.
typecheck_files = [
'check-basic.test',
'check-union-or-syntax.test',
'check-callable.test',
'check-classes.test',
'check-statements.test',
'check-generics.test',
'check-dynamic-typing.test',
'check-inference.test',
'check-inference-context.test',
'check-kwargs.test',
'check-overloading.test',
'check-type-checks.test',
'check-abstract.test',
'check-multiple-inheritance.test',
'check-super.test',
'check-modules.test',
'check-typevar-values.test',
'check-unsupported.test',
'check-unreachable-code.test',
'check-unions.test',
'check-isinstance.test',
'check-lists.test',
'check-namedtuple.test',
'check-narrowing.test',
'check-typeddict.test',
'check-type-aliases.test',
'check-ignore.test',
'check-type-promotion.test',
'check-semanal-error.test',
'check-flags.test',
'check-incremental.test',
'check-serialize.test',
'check-bound.test',
'check-optional.test',
'check-fastparse.test',
'check-warnings.test',
'check-async-await.test',
'check-newtype.test',
'check-class-namedtuple.test',
'check-selftype.test',
'check-python2.test',
'check-columns.test',
'check-functions.test',
'check-tuples.test',
'check-expressions.test',
'check-generic-subtyping.test',
'check-varargs.test',
'check-newsyntax.test',
'check-protocols.test',
'check-underscores.test',
'check-classvar.test',
'check-enum.test',
'check-incomplete-fixture.test',
'check-custom-plugin.test',
'check-default-plugin.test',
'check-attr.test',
'check-ctypes.test',
'check-dataclasses.test',
'check-final.test',
'check-redefine.test',
'check-literal.test',
'check-newsemanal.test',
'check-inline-config.test',
'check-reports.test',
'check-errorcodes.test',
'check-annotated.test',
'check-parameter-specification.test',
'check-generic-alias.test',
'check-typeguard.test',
'check-functools.test',
'check-singledispatch.test',
'check-slots.test',
'check-formatting.test'
]
typecheck_files = []
for path in (Path.cwd().parent.parent / 'test-data' / 'unit').rglob('check-*.test'):
if path.name != 'check-python38.test' and path.name != 'check-python39.test':
typecheck_files.append(path.name)

# Tests that use Python 3.8-only AST features (like expression-scoped ignores):
if sys.version_info >= (3, 8):
Expand Down