-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dump_workbaskets: output amount of seconds to render. (#596)
Add option to disable envelope splitting by size. Add option to specify the maximum envelope size. Add option to use the next available envelope id (not super useful yet as we don't use envelope upload)
- Loading branch information
Showing
6 changed files
with
108 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from exporter.util import exceptions_as_messages | ||
from exporter.util import item_timer | ||
|
||
|
||
def test_exceptions_as_messages(): | ||
exception_list = { | ||
"first_exception": [Exception("test")], | ||
"second_exception": [Exception("test2")], | ||
} | ||
|
||
messages = exceptions_as_messages(exception_list) | ||
|
||
assert messages == { | ||
"first_exception": ["raised an test"], | ||
"second_exception": ["raised an test2"], | ||
} | ||
|
||
|
||
def test_item_timer(): | ||
"""Verify that item_timer yields a tuple containing the time to retrieve | ||
each item and the item itself.""" | ||
items = item_timer([1, 2]) | ||
|
||
time_taken, item = next(items) | ||
|
||
assert item == 1 | ||
assert isinstance(time_taken, float) | ||
assert time_taken > 0.0 | ||
|
||
time_taken, item = next(items) | ||
|
||
assert item == 2 | ||
assert isinstance(time_taken, float) | ||
assert time_taken > 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1138,3 +1138,4 @@ Checkers | |
self.linked_model | ||
"Attach BusinessRules | ||
WorkBasketOutputFormat Enum | ||
param kwargs: |