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_flake8_command(self) -> None:
flake8_exe = Path("/bin/flake8")
with TemporaryDirectory() as td:
module_dir = Path(td)
cf = module_dir / ".flake8"
touch_files(cf)
conf = {"run_flake8": True}
self.assertEqual(
ptr._generate_flake8_cmd(module_dir, flake8_exe, conf),
(str(flake8_exe), "--config", str(cf)),
)