Title: Remove unnecessarily random behavior from
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.4, Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Daniel.Cioata, benjamin.peterson, berker.peksag, larry, mark.dickinson, r.david.murray
Priority: low Keywords: easy

Created on 2012-07-07 12:29 by larry, last changed 2014-10-05 18:52 by berker.peksag.

File name Uploaded Description Edit
submitted_patch_Issue15273 Daniel.Cioata, 2013-01-28 08:06 patch file for removing the random functionality from Tools/parser/ review
Messages (5)
msg164831 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2012-07-07 12:29
Tools/parser/ is the regression test suite for Tools/unparse.  To save time, if the "cpu" resource is not enabled it only test unparsing ten files.  However it picks these files at random.

It would be nice if the test was 100% repeatable.  It might be nice if it picked the most tortuous ten files.  What ten are the most tortuous is not immediately clear, but a nice first approximation might be to pick the largest ten, provided the stat calls don't themselves make the test slow again.
msg164832 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-07-07 12:31
Ideally, it would pick a small number of files that are likely to fully exercise Python's grammar.  So things like Lib/test/test_grammar might be useful to include.

Or perhaps there should be a Python file somewhere in Lib/test whose entire purpose is to contain at least one example of each grammar construction?
msg165026 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-07-08 17:15
I thought we had other tests that did this as well (pickle?).  If you need reproducibility you check the random seed and reuse it.
msg165063 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-07-09 05:11
test_grammar should be that file, though, people often forget to update it.
msg180838 - (view) Author: Daniel Cioata (Daniel.Cioata) Date: 2013-01-28 08:06
a solution for this issue
Date User Action Args
2014-10-05 18:52:18berker.peksagsetnosy: + berker.peksag
stage: needs patch -> patch review

components: + Tests
versions: + Python 3.5
2013-01-28 08:06:12Daniel.Cioatasetfiles: + submitted_patch_Issue15273
nosy: + Daniel.Cioata
messages: + msg180838

2012-07-09 05:11:33benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg165063
2012-07-08 17:15:43r.david.murraysetnosy: + r.david.murray
messages: + msg165026
2012-07-07 12:31:50mark.dickinsonsetmessages: + msg164832
2012-07-07 12:30:15mark.dickinsonsetkeywords: + easy
assignee: mark.dickinson ->
versions: + Python 3.4, - Python 3.3
2012-07-07 12:29:12larrycreate