Skip to content

Commit da9eef0

Browse files
ebolyenjairideout
authored andcommitted
TST: adds random_state to visualizer tests (#60)
Temporary "fix" for #59. This prevents stochastic test failures.
1 parent 4463148 commit da9eef0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

q2_sample_classifier/tests/test_classifier.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,18 @@ def test_invalids(self):
246246
# test experimental functions
247247
def test_maturity_index(self):
248248
maturity_index(self.temp_dir.name, self.table_ecam_fp, self.md_ecam_fp,
249-
category='month', group_by='delivery', n_jobs=1,
250-
control='Vaginal', test_size=0.4)
249+
category='month', group_by='delivery', random_state=123,
250+
n_jobs=1, control='Vaginal', test_size=0.4)
251251

252252
def test_detect_outliers(self):
253253
detect_outliers(self.table_chard_fp, self.md_chard_fp,
254-
n_jobs=1, contamination=0.05)
254+
random_state=123, n_jobs=1, contamination=0.05)
255255

256256
def test_predict_coordinates(self):
257257
pred, coords = predict_coordinates(
258258
self.table_chard_fp, self.md_chard_fp,
259-
axis1_category='latitude', axis2_category='longitude', n_jobs=1)
259+
axis1_category='latitude', axis2_category='longitude',
260+
random_state=123, n_jobs=1)
260261

261262

262263
md = pd.DataFrame([(1, 'a', 0.11), (1, 'a', 0.12), (1, 'a', 0.13),

0 commit comments

Comments
 (0)