Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
goodwanghan committed Aug 20, 2024
1 parent c6accb2 commit bceef07
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/tune/concepts/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ def test_logger_context():
m1 = MetricLogger()
m2 = MetricLogger()

with set_current_metric_logger(m1):
assert get_current_metric_logger() == m1
with set_current_metric_logger(m2):
assert get_current_metric_logger() == m2
assert get_current_metric_logger() == m1
with set_current_metric_logger(m1) as mm1:
assert get_current_metric_logger() is m1
assert mm1 is m1
with set_current_metric_logger(m2) as mm2:
assert get_current_metric_logger() is m2
assert mm2 is m2
assert get_current_metric_logger() is m1

0 comments on commit bceef07

Please sign in to comment.