Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 2b54a53

Browse files
committed
Use random.sample as random.choices is too new
1 parent 5689878 commit 2b54a53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ def test_get_matching_variables_performance():
235235
import random
236236
import string
237237
import root_pandas.readwrite
238-
for n in [10, 100, 1000, 10000, 100000]:
239-
branches = [' '.join(random.choices(string.ascii_letters, k=100)) for i in range(n)]
240-
patterns = [' '.join(random.choices(string.ascii_letters, k=100)) for i in range(n)]
238+
for n in [10, 100, 1000, 10000]:
239+
branches = [' '.join(random.sample(string.ascii_letters*100, k=100)) for i in range(n)]
240+
patterns = [' '.join(random.sample(string.ascii_letters*100, k=100)) for i in range(n)]
241241
root_pandas.readwrite.get_matching_variables(branches, patterns, fail=False)
242242
root_pandas.readwrite.get_matching_variables(branches, branches, fail=False)
243243

0 commit comments

Comments
 (0)