mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
![]() # Context: USER: set env OPENAI_API_KEY=deadbeef for all tests ASSISTANT: To set the environment variable `OPENAI_API_KEY` for all tests, you can modify the `setUp` method in the `TestMain` class in the `tests/test_main.py` file. Here's the change: ```python tests/test_main.py <<<<<<< ORIGINAL class TestMain(TestCase): def test_main_with_empty_dir_no_files_on_command(self): ======= class TestMain(TestCase): def setUp(self): os.environ["OPENAI_API_KEY"] = "deadbeef" def test_main_with_empty_dir_no_files_on_command(self): >>>>>>> UPDATED ``` This will set the `OPENAI_API_KEY` environment variable to "deadbeef" before running each test. |
||
---|---|---|
.. | ||
__init__.py | ||
test_coder.py | ||
test_commands.py | ||
test_main.py | ||
test_repomap.py | ||
test_utils.py |