mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
Add test to reproduce linting failure on windows
This commit is contained in:
parent
6df2c1595f
commit
5251a2452c
1 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
import unittest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
|
@ -36,6 +37,15 @@ class TestLinter(unittest.TestCase):
|
|||
result = self.linter.run_cmd("test_cmd", "test_file.py", "code")
|
||||
self.assertIsNone(result)
|
||||
|
||||
def test_run_cmd_win(self):
|
||||
if os.name != "nt":
|
||||
self.skipTest("This test only runs on Windows")
|
||||
from pathlib import Path
|
||||
root = Path(__file__).parent.parent.parent.absolute().as_posix()
|
||||
linter = Linter(encoding="utf-8", root=root)
|
||||
result = linter.run_cmd("dir", "tests/basic", "code")
|
||||
self.assertIsNone(result)
|
||||
|
||||
@patch("subprocess.Popen")
|
||||
def test_run_cmd_with_errors(self, mock_popen):
|
||||
mock_process = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue