forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some tests from cmdline.test (python#5966 ) (python#17565)
Relates python#5966. Below is the info what happened with the concrete test from `cmdline.test`: 1. `testErrorContextConfig` => check-flags.test (`testShowErrorContextFunction`) [duplicate] 2. `testNoConfigFile` => check-flags.test (`testNoConfigFile`) [move] 3. `testPerFileConfigSection` => check-flags.test (`testPerFileUntypedDefs`) [move] 4. `testIgnoreErrorsConfig` => check-flags.test (`testPerFileIgnoreErrors`) [move] 5. `testConfigFollowImportsNormal` => check-flags.test (`testFollowImportsNormal`) [move + modified] 6. `testConfigFollowImportsSilent` => check-flags (`testFollowImportsSilent`) [move + modified] 7. `testConfigFollowImportsSkip` => check-flags (`testFollowImportsSkip`) [move + modified] 8. `testConfigFollowImportsError` => check-flags.test (`testFollowImportsError`) [move + modified] 9. `testConfigFollowImportsSelective` => check-flags.test (`testFollowImportsSelective`) [move] 10. `testConfigSilentMissingImportsOff` => check-flags.test (`testSilentMissingImportsOff`) [move] 11. `testConfigSilentMissingImportsOn` => check-flags.test (`testSilentMissingImportsOn`) [move] 12. `testDisallowAnyGenericsBuiltinCollectionsPre39` => check-flags.test (`testDisallowAnyGenericsBuiltinTuplePre39`, `testDisallowAnyGenericsBuiltinListPre39`, `testDisallowAnyGenericsBuiltinSetPre39`, `testDisallowAnyGenericsBuiltinDictPre39`) [split] 13. `testDisallowAnyGenericsTypingCollections` => check-flags.test (`testDisallowAnyGenericsTupleWithNoTypeParamsGeneric`, `testDisallowAnyGenericsPlainList`, `testDisallowAnyGenericsPlainDict`, `testDisallowAnyGenericsPlainSet`) [split] 14. `testDisallowUntypedDefsAndGeneric` => check-flags.test (`testDisallowUntypedDefsAndGeneric`) [move] 15. `testParseError` => parse-errors.test (`testMissingBracket`) [move] 16. `testParseErrorAnnots` => check-fastparse.test (`testFasterParseTooManyArgumentsAnnotation`) [duplicate] 17. `testNotesOnlyResultInExitSuccess` => check-flags.test (`testNotesOnlyResultInExitSuccess`) [move] Let's compare test execution time. I've run `pytest -n 4 mypy/test/testcmdline.py` 3 times on my machine and calculated the average time. - Before: 130 tests, 1m 02s - After: 115 tests, 0m 55s Also, if it's possible to use fixture `FrozenSet` in `check-flags.test`, we'd be able to totally split items 12 and 13 from the above list. And `testMissingBracket` is skipped by pytest in the `parse-errors.test`-file, but, probably, this file is the best variant for it (not sure about it).
- Loading branch information
Showing
3 changed files
with
176 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.