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_does_not_error_on_empty_file(tmp_path):
init_py = tmp_path / "__init__.py"
init_py.write_text("")
assert len(init_py.read_text()) == 0
retype_file(init_py, tmp_path, tmp_path)
assert len(init_py.read_text()) == 0