[Python-Dev] Extremely slow test modules

Serhiy Storchaka storchaka at gmail.com
Sat Jun 3 10:43:23 EDT 2017


03.06.17 16:01, Antoine Pitrou пише:
> On Sat, 3 Jun 2017 15:28:18 +0300
> Serhiy Storchaka <storchaka at gmail.com> wrote:
>>
>> 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.
> 
> There's no need to parse the whole stdlib for that.  Just parse a
> couple files with the required syntax constructs (for example the test
> suite, which by construction should have all of them).

We don't know what these files are. It may be possible (and even 
likely), that parsing the whole stdlib is not enough. Ideally the tests 
should parse the whole word, but this is impossible for some reasons.

>> 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.
> 
> I don't really care about the buildbots, but I care about CI
> turnaround.  A Travis-CI test run takes 24 minutes.  Assuming it uses 4
> cores and those 4 tests take more than 6 minutes each, that means we
> could almost shave 6 minutes (25%) on the duration of the Travis-CI
> test run.

They could be disabled on Travis-CI too.



More information about the Python-Dev mailing list