Skip to content

Commit 2266911

Browse files
shoyerjreback
authored andcommitted
TST: make test_astype_categorical_to_other deterministic (#26244)
1 parent 9feb3ad commit 2266911

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/series/test_dtypes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ def test_astype_from_categorical(self):
268268

269269
def test_astype_categorical_to_other(self):
270270

271-
df = DataFrame({'value': np.random.randint(0, 10000, 100)})
271+
value = np.random.RandomState(0).randint(0, 10000, 100)
272+
df = DataFrame({'value': value})
272273
labels = ["{0} - {1}".format(i, i + 499) for i in range(0, 10000, 500)]
273274
cat_labels = Categorical(labels, labels)
274275

0 commit comments

Comments
 (0)