Skip to content

Commit

Permalink
fix test for dt.timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Prodesire committed Apr 23, 2018
1 parent 9e9a6a5 commit 12e43e4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ def test_context_manager(self):
assert timeit.elapsed is not None

def test_decorator(self):
import sys
timeit = timer(print_func=print)
timeit = timer()

@timeit
def foo():
os.getcwd()

foo()
assert timeit.elapsed is not None

def test_print_func(self):
import sys
timeit = timer(print_func=sys.stdout.write)

with timeit:
os.getcwd()

assert timeit.elapsed is not None

0 comments on commit 12e43e4

Please sign in to comment.