[Python-Dev] Extremely slow test modules
Serhiy Storchaka
storchaka at gmail.com
Sat Jun 3 08:28:18 EDT 2017
03.06.17 13:31, Antoine Pitrou пише:
> Is there a reason some of our tests are excruciatingly slow in `-uall`
> mode? `test_multiprocessing_spawn` is understandable (after all, it
> will spawn a new executable for each subprocess), but other tests leave
> me baffled:
>
> - test_tools: 7 min 41 sec
> - test_tokenize: 6 min 23 sec
> - test_datetime: 6 min 3 sec
> - test_lib2to3: 5 min 25 sec
> [excerpt from recent Travis CI logs]
>
> Why does datetime, 2to3 or tokenize testing take so long? And do we
> have so many tools that it should take 7 minutes to run all of them?
> I must admit, I don't understand how we got to such a point.
test_tools (in particular the test for the unparse.py script),
test_tokenize, and test_lib2to3 read and proceed every Python file in
the stdlib. This is necessary in full test run because some syntax
constructs are very rarely used. This is controlled by the cpy resource.
I suggested to disable it on the slowest buildbots (-uall,-cpu). In that
case tests are ran only for few random files.
test_datetime generates tests for all possible timezones. This is
controlled by the tzdata resource and also can be disabled on the
slowest buildbots.
More information about the Python-Dev
mailing list