@@ -48,9 +48,8 @@ async def test_baseline_multiple_non_overlapping_entities() -> None:
4848 config ,
4949 )
5050
51- # Record baseline output - will fill in after running
51+ # Record baseline output
5252 checked_text = result .info ["checked_text" ]
53- print (f"Multiple entities result: { checked_text } " )
5453 assert "<EMAIL_ADDRESS>" in checked_text # noqa: S101
5554 assert "<PHONE_NUMBER>" in checked_text # noqa: S101
5655
@@ -70,7 +69,6 @@ async def test_baseline_consecutive_entities() -> None:
7069
7170 # Record baseline output
7271 checked_text = result .info ["checked_text" ]
73- print (f"Consecutive entities result: { checked_text } " )
7472 assert checked_text .count ("<EMAIL_ADDRESS>" ) == 2 # noqa: S101
7573
7674
@@ -81,11 +79,9 @@ async def test_baseline_entity_at_boundaries() -> None:
8179
8280 # Email at start
8381 result_start = await pii (
None ,
"[email protected] is the contact" ,
config )
84- print (f"Entity at start: { result_start .info ['checked_text' ]} " )
8582
8683 # Email at end
8784 result_end = await pii (
None ,
"Contact: [email protected] " ,
config )
88- print (f"Entity at end: { result_end .info ['checked_text' ]} " )
8985
9086 assert result_start .info ["checked_text" ].startswith ("<EMAIL_ADDRESS>" ) # noqa: S101
9187 assert result_end .info ["checked_text" ].endswith ("<EMAIL_ADDRESS>" ) # noqa: S101
@@ -103,7 +99,6 @@ async def test_baseline_unicode_characters() -> None:
10399
104100 # Record baseline output
105101 checked_text = result .info ["checked_text" ]
106- print (f"Unicode result: { checked_text } " )
107102 assert "<EMAIL_ADDRESS>" in checked_text # noqa: S101
108103 assert "🔒" in checked_text # noqa: S101
109104
@@ -120,7 +115,6 @@ async def test_baseline_special_characters() -> None:
120115
121116 # Record baseline output
122117 checked_text = result .info ["checked_text" ]
123- print (f"Special chars result: { checked_text } " )
124118 assert "[<EMAIL_ADDRESS>]" in checked_text or "Contact: <EMAIL_ADDRESS>" in checked_text # noqa: S101
125119
126120
@@ -143,7 +137,6 @@ async def test_baseline_credit_card_masking() -> None:
143137
144138 # Record baseline output
145139 checked_text = result .info ["checked_text" ]
146- print (f"Credit card result: { checked_text } " )
147140 # Credit card detection may be inconsistent with certain formats
148141 if result .info ["pii_detected" ]:
149142 assert "<CREDIT_CARD>" in checked_text # noqa: S101
@@ -166,10 +159,6 @@ async def test_baseline_phone_number_formats() -> None:
166159 result3 = await pii (None , "Mobile: 5551234567" , config )
167160 texts_and_results .append (("5551234567" , result3 .info ["checked_text" ]))
168161
169- for original , checked in texts_and_results :
170- print (f"Phone format '{ original } ': { checked } " )
171- # At least one should be detected and masked
172-
173162 # Check that at least the first format is detected
174163 assert "<PHONE_NUMBER>" in result1 .info ["checked_text" ] # noqa: S101
175164
@@ -194,7 +183,6 @@ async def test_baseline_mixed_entities_complex() -> None:
194183
195184 # Record baseline output
196185 checked_text = result .info ["checked_text" ]
197- print (f"Complex mixed result: { checked_text } " )
198186
199187 # Verify all entity types are masked
200188 assert "<EMAIL_ADDRESS>" in checked_text # noqa: S101
0 commit comments