@@ -1343,12 +1343,12 @@ def test_low_pressure_status_only(self, tmp_path):
13431343 p .content for m in out
13441344 for p in m .parts if isinstance (p , SystemPromptPart )
13451345 ]
1346- assert any ("CONTEXT:" in l for l in labels )
1346+ assert any ("CONTEXT:" in line for line in labels )
13471347 # No pressure wording
1348- for l in labels :
1349- if "CONTEXT:" in l :
1350- assert "pressure" not in l .lower ()
1351- assert "HARD" not in l
1348+ for line in labels :
1349+ if "CONTEXT:" in line :
1350+ assert "pressure" not in line .lower ()
1351+ assert "HARD" not in line
13521352
13531353 def test_soft_pressure_label (self , tmp_path ):
13541354 """60-80% triggers soft pressure wording suggesting prune()."""
@@ -1366,10 +1366,10 @@ def test_soft_pressure_label(self, tmp_path):
13661366 p .content for m in messages
13671367 for p in m .parts if isinstance (p , SystemPromptPart )
13681368 ]
1369- ctx_labels = [l for l in labels if "CONTEXT:" in l ]
1369+ ctx_labels = [line for line in labels if "CONTEXT:" in line ]
13701370 assert ctx_labels , "Expected at least one CONTEXT: label"
1371- assert any ("soft pressure" in l for l in ctx_labels )
1372- assert not any ("HARD PRESSURE" in l for l in ctx_labels )
1371+ assert any ("soft pressure" in line for line in ctx_labels )
1372+ assert not any ("HARD PRESSURE" in line for line in ctx_labels )
13731373
13741374 def test_hard_pressure_label (self , tmp_path ):
13751375 """Above 80% triggers HARD PRESSURE wording demanding prune()."""
@@ -1385,9 +1385,9 @@ def test_hard_pressure_label(self, tmp_path):
13851385 p .content for m in messages
13861386 for p in m .parts if isinstance (p , SystemPromptPart )
13871387 ]
1388- ctx_labels = [l for l in labels if "CONTEXT:" in l ]
1388+ ctx_labels = [line for line in labels if "CONTEXT:" in line ]
13891389 assert ctx_labels
1390- assert any ("HARD PRESSURE" in l for l in ctx_labels )
1390+ assert any ("HARD PRESSURE" in line for line in ctx_labels )
13911391
13921392
13931393# ---------------------------------------------------------------------------
@@ -1414,7 +1414,7 @@ def test_empty_notes_shows_zero(self, tmp_path):
14141414 p .content for m in messages
14151415 for p in m .parts if isinstance (p , SystemPromptPart )
14161416 ]
1417- assert any ("NOTES:" in l and "0 findings" in l for l in labels )
1417+ assert any ("NOTES:" in line and "0 findings" in line for line in labels )
14181418
14191419 def test_notes_grouped_by_theme (self , tmp_path ):
14201420 """deps.notes with 8 findings across 3 themes produces a label listing all three."""
@@ -1438,7 +1438,7 @@ def test_notes_grouped_by_theme(self, tmp_path):
14381438 p .content for m in messages
14391439 for p in m .parts if isinstance (p , SystemPromptPart )
14401440 ]
1441- notes_line = next ((l for l in labels if l .startswith ("NOTES:" )), None )
1441+ notes_line = next ((line for line in labels if line .startswith ("NOTES:" )), None )
14421442 assert notes_line is not None
14431443 assert "8 findings" in notes_line
14441444 assert "3 theme" in notes_line
@@ -1465,7 +1465,7 @@ def test_reads_live_state_not_snapshot(self, tmp_path):
14651465 p .content for m in messages_1
14661466 for p in m .parts if isinstance (p , SystemPromptPart )
14671467 ]
1468- line_1 = next ((l for l in labels_1 if l .startswith ("NOTES:" )), None )
1468+ line_1 = next ((line for line in labels_1 if line .startswith ("NOTES:" )), None )
14691469 assert line_1 is not None
14701470 assert "1 theme" in line_1
14711471
@@ -1479,7 +1479,7 @@ def test_reads_live_state_not_snapshot(self, tmp_path):
14791479 p .content for m in messages_2
14801480 for p in m .parts if isinstance (p , SystemPromptPart )
14811481 ]
1482- line_2 = next ((l for l in labels_2 if l .startswith ("NOTES:" )), None )
1482+ line_2 = next ((line for line in labels_2 if line .startswith ("NOTES:" )), None )
14831483 assert line_2 is not None
14841484 assert "2 theme" in line_2
14851485 assert "theme2" in line_2
0 commit comments