mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
style: Fix formatting and linting issues in test_main.py
This commit is contained in:
parent
da5ea3a767
commit
3549ed1205
1 changed files with 4 additions and 4 deletions
|
@ -401,18 +401,18 @@ class TestMain(TestCase):
|
||||||
with GitTemporaryDirectory():
|
with GitTemporaryDirectory():
|
||||||
test_file = "test_file.txt"
|
test_file = "test_file.txt"
|
||||||
Path(test_file).touch()
|
Path(test_file).touch()
|
||||||
|
|
||||||
coder = main(
|
coder = main(
|
||||||
["--read", test_file, "--exit", "--yes"],
|
["--read", test_file, "--exit", "--yes"],
|
||||||
input=DummyInput(),
|
input=DummyInput(),
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
return_coder=True,
|
return_coder=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertIn(str(Path(test_file).resolve()), coder.abs_read_only_fnames)
|
self.assertIn(str(Path(test_file).resolve()), coder.abs_read_only_fnames)
|
||||||
|
|
||||||
def test_read_option_with_external_file(self):
|
def test_read_option_with_external_file(self):
|
||||||
with tempfile.NamedTemporaryFile(mode='w', delete=False) as external_file:
|
with tempfile.NamedTemporaryFile(mode="w", delete=False) as external_file:
|
||||||
external_file.write("External file content")
|
external_file.write("External file content")
|
||||||
external_file_path = external_file.name
|
external_file_path = external_file.name
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ class TestMain(TestCase):
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
return_coder=True,
|
return_coder=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertIn(external_file_path, coder.abs_read_only_fnames)
|
self.assertIn(external_file_path, coder.abs_read_only_fnames)
|
||||||
finally:
|
finally:
|
||||||
os.unlink(external_file_path)
|
os.unlink(external_file_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue