(fn)
| 763 | fn = os.path.join(TEST_DATA_DIR, filename) |
| 764 | |
| 765 | def check_valid_file(fn): |
| 766 | f = open(fn, *args, **kw) |
| 767 | if check is None: |
| 768 | return f |
| 769 | elif check(f): |
| 770 | f.seek(0) |
| 771 | return f |
| 772 | f.close() |
| 773 | |
| 774 | if os.path.exists(fn): |
| 775 | f = check_valid_file(fn) |
no test coverage detected