Files
instagram-bot/patch_sae_tests.py

24 lines
680 B
Python

import re
with open("tests/e2e/test_e2e_sae.py", "r") as f:
content = f.read()
# Remove test_perceive_randomized_chaos_modal
content = re.sub(
r" def test_perceive_randomized_chaos_modal\(self, mock_telepathic_classifier\):.*?(?= def test_perceive_action_blocked)",
"",
content,
flags=re.DOTALL,
)
# Remove test_recovers_from_randomized_chaos_modal
content = re.sub(
r" def test_recovers_from_randomized_chaos_modal\(self, mock_telepathic_classifier, mock_fallback_llm\):.*?(?= def test_recovers_from_unknown_modal_german)",
"",
content,
flags=re.DOTALL,
)
with open("tests/e2e/test_e2e_sae.py", "w") as f:
f.write(content)