test: disable analytics in test environment

This commit is contained in:
Paul Gauthier 2024-12-02 17:56:45 -08:00 committed by Paul Gauthier (aider)
parent fb005dd01b
commit b2da3545f9
2 changed files with 3 additions and 0 deletions

View file

@ -7,6 +7,8 @@ from aider.main import main
class TestBrowser(unittest.TestCase):
@patch("aider.main.launch_gui")
def test_browser_flag_imports_streamlit(self, mock_launch_gui):
os.environ["AIDER_ANALYTICS"] = "false"
# Run main with --browser and --yes flags
main(["--browser", "--yes"])