File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ def pytest_addoption(parser):
3131 action = "store_true" ,
3232 help = "disable the Hypothesis deadline" ,
3333 )
34+ # Hypothesis derandomize
35+ parser .addoption (
36+ "--hypothesis-derandomize" ,
37+ "--derandomize" ,
38+ action = "store_true" ,
39+ help = "set the Hypothesis derandomize parameter" ,
40+ )
3441 # disable extensions
3542 parser .addoption (
3643 "--disable-extension" ,
@@ -79,11 +86,14 @@ def pytest_configure(config):
7986 # Hypothesis
8087 hypothesis_max_examples = config .getoption ("--hypothesis-max-examples" )
8188 disable_deadline = config .getoption ("--hypothesis-disable-deadline" )
89+ derandomize = config .getoption ("--hypothesis-derandomize" )
8290 profile_settings = {}
8391 if hypothesis_max_examples is not None :
8492 profile_settings ["max_examples" ] = int (hypothesis_max_examples )
8593 if disable_deadline :
8694 profile_settings ["deadline" ] = None
95+ if derandomize :
96+ profile_settings ["derandomize" ] = True
8797 if profile_settings :
8898 settings .register_profile ("xp_override" , ** profile_settings )
8999 settings .load_profile ("xp_override" )
You can’t perform that action at this time.
0 commit comments