| 1 |
from __future__ import absolute_import, print_function, division |
| 2 |
|
| 3 |
|
| 4 |
from petl.util.counting import nrows |
| 5 |
from petl.util.timing import progress, log_progress |
| 6 |
|
| 7 |
|
| 8 |
def test_progress(): |
| 9 |
# make sure progress doesn't raise exception |
| 10 |
table = (('foo', 'bar', 'baz'), |
| 11 |
('a', 1, True), |
| 12 |
('b', 2, True), |
| 13 |
('b', 3)) |
| 14 |
nrows(progress(table)) |
| 15 |
|
| 16 |
def test_log_progress(): |
| 17 |
# make sure log_progress doesn't raise exception |
| 18 |
table = (('foo', 'bar', 'baz'), |
| 19 |
('a', 1, True), |
| 20 |
('b', 2, True), |
| 21 |
('b', 3)) |
| 22 |
nrows(log_progress(table)) |