@@ -33,16 +33,14 @@ def make_long():
3333
3434 def make_unicode ():
3535 word_size = random .randint (1 , 26 )
36- word = u'' .join (
37- random .sample (u'abcdefghijklmnopqrstuvwxyz' , word_size )
38- )
36+ word = '' .join (random .sample ('abcdefghijklmnopqrstuvwxyz' , word_size ))
3937 size = random .randint (1 , int (200 / 13 ))
4038 return word * size
4139
4240 def make_bytes ():
4341 word_size = random .randint (1 , 26 )
44- word = u '' .join (
45- random .sample (u 'abcdefghijklmnopqrstuvwxyz' , word_size )
42+ word = '' .join (
43+ random .sample ('abcdefghijklmnopqrstuvwxyz' , word_size )
4644 ).encode ('utf-8' )
4745 size = random .randint (1 , int (200 / 13 ))
4846 return word * size
@@ -77,18 +75,16 @@ def make_long():
7775
7876 def make_unicode ():
7977 word_size = random .randint (1 , 26 )
80- word = u'' .join (
81- random .sample (u'abcdefghijklmnopqrstuvwxyz' , word_size )
82- )
83- size = random .randint (1 , int (2 ** 16 / 13 ))
78+ word = '' .join (random .sample ('abcdefghijklmnopqrstuvwxyz' , word_size ))
79+ size = random .randint (1 , int (2 ** 16 / 13 ))
8480 return word * size
8581
8682 def make_bytes ():
8783 word_size = random .randint (1 , 26 )
88- word = u '' .join (
89- random .sample (u 'abcdefghijklmnopqrstuvwxyz' , word_size )
84+ word = '' .join (
85+ random .sample ('abcdefghijklmnopqrstuvwxyz' , word_size )
9086 ).encode ('utf-8' )
91- size = random .randint (1 , int (2 ** 16 / 13 ))
87+ size = random .randint (1 , int (2 ** 16 / 13 ))
9288 return word * size
9389
9490 def make_float ():
@@ -233,7 +229,7 @@ def percentile(sequence, percent):
233229def stress_test (
234230 create = True ,
235231 delete = True ,
236- eviction_policy = u 'least-recently-stored' ,
232+ eviction_policy = 'least-recently-stored' ,
237233 processes = 1 ,
238234 threads = 1 ,
239235):
@@ -293,17 +289,17 @@ def stress_test(
293289
294290def stress_test_lru ():
295291 """Stress test least-recently-used eviction policy."""
296- stress_test (eviction_policy = u 'least-recently-used' )
292+ stress_test (eviction_policy = 'least-recently-used' )
297293
298294
299295def stress_test_lfu ():
300296 """Stress test least-frequently-used eviction policy."""
301- stress_test (eviction_policy = u 'least-frequently-used' )
297+ stress_test (eviction_policy = 'least-frequently-used' )
302298
303299
304300def stress_test_none ():
305301 """Stress test 'none' eviction policy."""
306- stress_test (eviction_policy = u 'none' )
302+ stress_test (eviction_policy = 'none' )
307303
308304
309305def stress_test_mp ():
@@ -396,7 +392,7 @@ def stress_test_mp():
396392 '-v' ,
397393 '--eviction-policy' ,
398394 type = str ,
399- default = u 'least-recently-stored' ,
395+ default = 'least-recently-stored' ,
400396 )
401397
402398 args = parser .parse_args ()
0 commit comments