mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 13:25:00 +00:00
24 lines
714 B
Python
24 lines
714 B
Python
import os
|
|
import unittest
|
|
from unittest.mock import patch
|
|
|
|
from aider.io import AutoCompleter, InputOutput
|
|
|
|
|
|
class TestInputOutput(unittest.TestCase):
|
|
def test_no_color_environment_variable(self):
|
|
with patch.dict(os.environ, {"NO_COLOR": "1"}):
|
|
io = InputOutput()
|
|
self.assertFalse(io.pretty)
|
|
|
|
def test_autocompleter_with_non_existent_file(self):
|
|
root = ""
|
|
rel_fnames = ["non_existent_file.txt"]
|
|
addable_rel_fnames = []
|
|
commands = None
|
|
autocompleter = AutoCompleter(root, rel_fnames, addable_rel_fnames, commands, "utf-8")
|
|
self.assertEqual(autocompleter.words, set(rel_fnames))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|