(content)
| 394 | |
| 395 | @contextmanager |
| 396 | def tempfile(content): |
| 397 | # Using this instead of the tempfile module because Windows won't read |
| 398 | # from a file not yet written to disk |
| 399 | with open(vim_eval('tempname()'), 'w') as f: |
| 400 | f.write(content) |
| 401 | try: |
| 402 | yield f |
| 403 | finally: |
| 404 | os.unlink(f.name) |
| 405 | |
| 406 | |
| 407 | @_check_jedi_availability(show_error=True) |
no test coverage detected