From 6746da553959b063c8550e17904f0a488381c2aa Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 5 Jul 2023 14:27:41 -0700 Subject: [PATCH] try and stop rich.Console().rule() from throwing unicode errors in github ci --- tests/test_main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_main.py b/tests/test_main.py index dfff719ac..1029dcadb 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -14,6 +14,11 @@ from aider.main import main class TestMain(TestCase): def setUp(self): os.environ["OPENAI_API_KEY"] = "deadbeef" + + # Force this so that GitHub Actions windows tests don't barf on rich.Console().rule() + # https://github.com/Textualize/rich/issues/2411 + os.environ["PYTHONIOENCODING"] = "utf-8" + self.original_cwd = os.getcwd() self.tempdir = tempfile.mkdtemp() os.chdir(self.tempdir)