Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_generate_mypy_cmd(self) -> None:
with TemporaryDirectory() as td:
td_path = Path(td)
mypy_exe = Path("mypy")
mypy_ini_path = td_path / "mypy.ini"
entry_py_path = td_path / "cooper_is_awesome.py"
touch_files(mypy_ini_path, entry_py_path)
conf = {
"run_mypy": True,
"entry_point_module": entry_py_path.name.replace(".py", ""),
}
self.assertEqual(
ptr._generate_mypy_cmd(td_path, mypy_exe, conf),
(str(mypy_exe), "--config", str(mypy_ini_path), str(entry_py_path)),
)