MCPcopy Create free account
hub / github.com/apache/arrow / rands

Function rands

python/pyarrow/tests/util.py:116–121  ·  view source on GitHub ↗

Generate one random string.

(nchars)

Source from the content-addressed store, hash-verified

114
115
116def rands(nchars):
117 """
118 Generate one random string.
119 """
120 RANDS_CHARS = list(string.ascii_letters + string.digits)
121 return "".join(random.choice(RANDS_CHARS) for i in range(nchars))
122
123
124def memory_leak_check(f, metric='rss', threshold=1 << 17, iterations=10,

Callers 5

test_leak3Function · 0.90
_generate_dedup_exampleFunction · 0.90
setupMethod · 0.90
setupMethod · 0.90
generate_dict_stringsFunction · 0.90

Calls 2

listFunction · 0.85
joinMethod · 0.45

Tested by 2

test_leak3Function · 0.72
_generate_dedup_exampleFunction · 0.72