Skip to content

Commit 38bfc3d

Browse files
committed
Add linebuffer stress test
1 parent 3f53a6f commit 38bfc3d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/linebuffer-stress-test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/python
2+
# coding=UTF-8
3+
import random
4+
dwc=u"olore magna aliqua. Ut enim ad minim veniam, quis n"
5+
swc="abcdefghijklmnopqrstuvwxyz"
6+
while True:
7+
ll = int(random.random() * 2000)
8+
s = ""
9+
for i in xrange(ll):
10+
type = int(random.random() * 2)
11+
if type:
12+
c = dwc[int(random.random() * len(dwc))]
13+
else:
14+
c = swc[int(random.random() * len(swc))]
15+
s += c
16+
print s

0 commit comments

Comments
 (0)