Skip to content

Commit

Permalink
added add_log_entries to test_logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Nov 7, 2024
1 parent f39822b commit 514d002
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_evals/test_utils/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,28 @@ def test_log_caching():
)
msg = unify.add_log_params(logs=log, p="p")
assert msg == {"info": "Logs updated successfully!"}
# add_log_params
unify.add_log_params(logs=log, p="p")
assert (
_get_cache(
fn_name="add_log_params",
kw={"logs": log, "p": "p"},
)
is not None
)
msg = unify.add_log_params(logs=log, p="p")
assert msg == {"info": "Logs updated successfully!"}
# add_log_entries
unify.add_log_entries(logs=log, e="e")
assert (
_get_cache(
fn_name="add_log_entries",
kw={"logs": log, "e": "e"},
)
is not None
)
msg = unify.add_log_entries(logs=log, e="e")
assert msg == {"info": "Logs updated successfully!"}


if __name__ == "__main__":
Expand Down

0 comments on commit 514d002

Please sign in to comment.