Skip to content

Commit 6710050

Browse files
committed
refactor to remove unnecessary lambda expressions
1 parent 9896d2d commit 6710050

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_health.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_writes_file_and_updates_periodically(heartbeat: Heartbeat, monkeypatch:
5555

5656
heartbeat.start()
5757

58-
assert wait_until(lambda: heartbeat.path.exists()) # noqa: PLW0108
58+
assert wait_until(heartbeat.path.exists)
5959
assert heartbeat.path.read_text(encoding="utf-8") == "STAMP1"
6060

6161
monkeypatch.setattr(time, "strftime", lambda fmt: "STAMP2")
@@ -66,7 +66,7 @@ def test_stop_prevents_further_writes(heartbeat: Heartbeat, monkeypatch: pytest.
6666
"""Test that stopping the heartbeat prevents further writes to the heartbeat file."""
6767
monkeypatch.setattr(time, "strftime", lambda fmt: "BEFORE")
6868
heartbeat.start()
69-
assert wait_until(lambda: heartbeat.path.exists()) # noqa: PLW0108
69+
assert wait_until(heartbeat.path.exists)
7070
assert heartbeat.path.read_text(encoding="utf-8") == "BEFORE"
7171

7272
heartbeat.stop()

0 commit comments

Comments
 (0)