mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
move import
This commit is contained in:
parent
388f603ef9
commit
c6e71b443b
1 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import codecs
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -33,7 +34,6 @@ class TestCommands(TestCase):
|
||||||
self.assertTrue(os.path.exists("foo.txt"))
|
self.assertTrue(os.path.exists("foo.txt"))
|
||||||
self.assertTrue(os.path.exists("bar.txt"))
|
self.assertTrue(os.path.exists("bar.txt"))
|
||||||
|
|
||||||
import codecs
|
|
||||||
def test_cmd_add_bad_encoding(self):
|
def test_cmd_add_bad_encoding(self):
|
||||||
# Initialize the Commands and InputOutput objects
|
# Initialize the Commands and InputOutput objects
|
||||||
io = InputOutput(pretty=False, yes=True)
|
io = InputOutput(pretty=False, yes=True)
|
||||||
|
@ -43,8 +43,8 @@ class TestCommands(TestCase):
|
||||||
commands = Commands(io, coder)
|
commands = Commands(io, coder)
|
||||||
|
|
||||||
# Create a new file foo.bad which will fail to decode as utf-8
|
# Create a new file foo.bad which will fail to decode as utf-8
|
||||||
with codecs.open('foo.bad', 'w', encoding='iso-8859-15') as f:
|
with codecs.open("foo.bad", "w", encoding="iso-8859-15") as f:
|
||||||
f.write('ÆØÅ') # Characters not present in utf-8
|
f.write("ÆØÅ") # Characters not present in utf-8
|
||||||
|
|
||||||
commands.cmd_add("foo.bad")
|
commands.cmd_add("foo.bad")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue