(version)
| 370 | |
| 371 | @pytest.mark.pandas |
| 372 | def test_delete_partial_file_on_error(version): |
| 373 | if sys.platform == 'win32': |
| 374 | pytest.skip('Windows hangs on to file handle for some reason') |
| 375 | |
| 376 | class CustomClass: |
| 377 | pass |
| 378 | |
| 379 | # strings will fail |
| 380 | df = pd.DataFrame( |
| 381 | { |
| 382 | 'numbers': range(5), |
| 383 | 'strings': [b'foo', None, 'bar', CustomClass(), np.nan]}, |
| 384 | columns=['numbers', 'strings']) |
| 385 | |
| 386 | path = random_path() |
| 387 | try: |
| 388 | write_feather(df, path, version=version) |
| 389 | except Exception: |
| 390 | pass |
| 391 | |
| 392 | assert not os.path.exists(path) |
| 393 | |
| 394 | |
| 395 | @pytest.mark.pandas |
nothing calls this directly
no test coverage detected