Skip to content

Commit

Permalink
Added extra benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 7, 2017
1 parent 7b94d2e commit 9edbf84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ def create_promise(): # unnecessary function call
p = Promise()


def test_benchmark_promise_resolve(benchmark):
def create_promise():
return Promise.resolve(True)

result = benchmark(create_promise).get()
assert result == True


def test_benchmark_promise_creation_with_resolve(benchmark):
do_resolve = lambda resolve, reject: resolve(True)

Expand Down

0 comments on commit 9edbf84

Please sign in to comment.