monor coverage fix, flake8 tests for examples

This commit is contained in:
Casper da Costa-Luis 2015-10-29 10:34:47 +00:00 committed by Casper da Costa-Luis
parent e40aa35e85
commit 8a34a75963
3 changed files with 15 additions and 12 deletions

View File

@ -9,4 +9,5 @@ test:
nosetests tqdm -v
coverage:
rm -f .coverage # coverage erase
nosetests tqdm --with-coverage --cover-package=tqdm -v

View File

@ -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'

View File

@ -21,3 +21,4 @@ basepython = python2.7
deps = flake8
commands =
flake8 --count --statistics tqdm/
flake8 --count --statistics examples/