This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from cStringIO import StringIO | |
from UserString import MutableString | |
data = xrange(100000) | |
def test_join_way(): | |
return ''.join([str(x) for x in data]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
data = range(10000000) | |
def test_method(method): | |
start_time = time.time() | |
result = method() | |
assert len(result) == 68888890, 'Method work no good: %s != 68888890' % len(result) | |
end_time = time.time() |