mirror of https://github.com/tqdm/tqdm.git
monor coverage fix, flake8 tests for examples
This commit is contained in:
parent
e40aa35e85
commit
8a34a75963
1
Makefile
1
Makefile
|
@ -9,4 +9,5 @@ test:
|
|||
nosetests tqdm -v
|
||||
|
||||
coverage:
|
||||
rm -f .coverage # coverage erase
|
||||
nosetests tqdm --with-coverage --cover-package=tqdm -v
|
||||
|
|
|
@ -12,18 +12,19 @@ for i in trange(16, leave=True):
|
|||
|
||||
# Profiling/overhead tests
|
||||
stmts = (
|
||||
# Benchmark
|
||||
'[i for i in xrange(int(1e8))]',
|
||||
# Basic demo
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8))]',
|
||||
# Some decorations
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8), miniters=int(1e6),'
|
||||
' ascii=True, desc="cool", dynamic_ncols=True)]',
|
||||
# Experimental GUI demo
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8), gui=True)]',
|
||||
# Comparison to https://code.google.com/p/python-progressbar/
|
||||
'from progressbar.progressbar import ProgressBar;'
|
||||
' [i for i in ProgressBar()(xrange(int(1e8)))]')
|
||||
# Benchmark
|
||||
'[i for i in xrange(int(1e8))]',
|
||||
# Basic demo
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8))]',
|
||||
# Some decorations
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8), miniters=int(1e6),'
|
||||
' ascii=True, desc="cool", dynamic_ncols=True)]',
|
||||
# Experimental GUI demo
|
||||
'import tqdm; [i for i in tqdm.trange(int(1e8), gui=True)]',
|
||||
# Comparison to https://code.google.com/p/python-progressbar/
|
||||
'from progressbar.progressbar import ProgressBar;'
|
||||
' [i for i in ProgressBar()(xrange(int(1e8)))]')
|
||||
|
||||
for s in stmts:
|
||||
print s
|
||||
print timeit(stmt=s, number=1), 'seconds'
|
||||
|
|
Loading…
Reference in New Issue