(self)
| 157 | self.tool = GlobTool() |
| 158 | |
| 159 | def test_find_python_files(self): |
| 160 | with tempfile.TemporaryDirectory() as tmpdir: |
| 161 | (Path(tmpdir) / "a.py").write_text("pass") |
| 162 | (Path(tmpdir) / "b.txt").write_text("text") |
| 163 | result = self.tool.execute({"pattern": "*.py", "directory": tmpdir}) |
| 164 | self.assertFalse(result.is_error) |
| 165 | self.assertIn("a.py", result.output) |
| 166 | self.assertNotIn("b.txt", result.output) |
| 167 | |
| 168 | |
| 169 | class TestGrepTool(unittest.TestCase): |