File tree 1 file changed +10
-0
lines changed
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):
31
31
action = "store_true" ,
32
32
help = "disable the Hypothesis deadline" ,
33
33
)
34
+ # Hypothesis derandomize
35
+ parser .addoption (
36
+ "--hypothesis-derandomize" ,
37
+ "--derandomize" ,
38
+ action = "store_true" ,
39
+ help = "set the Hypothesis derandomize parameter" ,
40
+ )
34
41
# disable extensions
35
42
parser .addoption (
36
43
"--disable-extension" ,
@@ -79,11 +86,14 @@ def pytest_configure(config):
79
86
# Hypothesis
80
87
hypothesis_max_examples = config .getoption ("--hypothesis-max-examples" )
81
88
disable_deadline = config .getoption ("--hypothesis-disable-deadline" )
89
+ derandomize = config .getoption ("--hypothesis-derandomize" )
82
90
profile_settings = {}
83
91
if hypothesis_max_examples is not None :
84
92
profile_settings ["max_examples" ] = int (hypothesis_max_examples )
85
93
if disable_deadline :
86
94
profile_settings ["deadline" ] = None
95
+ if derandomize :
96
+ profile_settings ["derandomize" ] = True
87
97
if profile_settings :
88
98
settings .register_profile ("xp_override" , ** profile_settings )
89
99
settings .load_profile ("xp_override" )
You can’t perform that action at this time.
0 commit comments