Move some tests from cmdline.test (#5966 ) #17565
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates #5966.
Below is the info what happened with the concrete test from
cmdline.test:testErrorContextConfig=> check-flags.test (testShowErrorContextFunction) [duplicate]testNoConfigFile=> check-flags.test (testNoConfigFile) [move]testPerFileConfigSection=> check-flags.test (testPerFileUntypedDefs) [move]testIgnoreErrorsConfig=> check-flags.test (testPerFileIgnoreErrors) [move]testConfigFollowImportsNormal=> check-flags.test (testFollowImportsNormal) [move + modified]testConfigFollowImportsSilent=> check-flags (testFollowImportsSilent) [move + modified]testConfigFollowImportsSkip=> check-flags (testFollowImportsSkip) [move + modified]testConfigFollowImportsError=> check-flags.test (testFollowImportsError) [move + modified]testConfigFollowImportsSelective=> check-flags.test (testFollowImportsSelective) [move]testConfigSilentMissingImportsOff=> check-flags.test (testSilentMissingImportsOff) [move]testConfigSilentMissingImportsOn=> check-flags.test (testSilentMissingImportsOn) [move]testDisallowAnyGenericsBuiltinCollectionsPre39=> check-flags.test (testDisallowAnyGenericsBuiltinTuplePre39,testDisallowAnyGenericsBuiltinListPre39,testDisallowAnyGenericsBuiltinSetPre39,testDisallowAnyGenericsBuiltinDictPre39) [split]testDisallowAnyGenericsTypingCollections=> check-flags.test (testDisallowAnyGenericsTupleWithNoTypeParamsGeneric,testDisallowAnyGenericsPlainList,testDisallowAnyGenericsPlainDict,testDisallowAnyGenericsPlainSet) [split]testDisallowUntypedDefsAndGeneric=> check-flags.test (testDisallowUntypedDefsAndGeneric) [move]testParseError=> parse-errors.test (testMissingBracket) [move]testParseErrorAnnots=> check-fastparse.test (testFasterParseTooManyArgumentsAnnotation) [duplicate]testNotesOnlyResultInExitSuccess=> check-flags.test (testNotesOnlyResultInExitSuccess) [move]Let's compare test execution time. I've run
pytest -n 4 mypy/test/testcmdline.py3 times on my machine and calculated the average time.Also, if it's possible to use fixture
FrozenSetincheck-flags.test, we'd be able to totally split items 12 and 13 from the above list.And
testMissingBracketis skipped by pytest in theparse-errors.test-file, but, probably, this file is the best variant for it (not sure about it).