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_can_run_against_current_directory(tmp_path):
# Regression test for `retype --pyi-dir . --target-dir . .`
(tmp_path / "main.py").write_text("print('hello!')")
pwd = Path(".")
errors = []
with as_cwd(tmp_path):
for path, exc_msg, exc_type, exc_tb in retype_path(pwd, pwd, pwd):
errors.append((path, exc_msg, exc_type, exc_tb))
assert not errors