Changeset 0ed0405


Ignore:
Timestamp:
Nov 1, 2018, 10:19:39 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
98972b9
Parents:
0bae15a
Message:

[tests] do not try re-opening temporary file on windows, display a warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/utils.py

    r0bae15a r0ed0405  
    3636        os.unlink(path)
    3737    except WindowsError as e:
    38         print("deleting {:s} failed ({:s}), reopening".format(path, repr(e)))
    39         with open(path, 'wb') as f:
    40             f.close()
    41         try:
    42             os.unlink(path)
    43         except WindowsError as f:
    44             print("deleting {:s} failed ({:s}), aborting".format(path, repr(e)))
     38        # removing the temporary directory sometimes fails on windows
     39        errmsg = "failed deleting temporary file {:s} ({:s})"
     40        warnings.warn(UserWarning(errmsg.format(path, repr(e))))
    4541
    4642def array_from_yaml_file(filename):
Note: See TracChangeset for help on using the changeset viewer.