Affects Version/s: None
Fix Version/s: 2.2.0
On macOS 10.14 the test_file.TestPreserveTimes test fails. See Travis on https://travis-ci.org/metabrainz/picard/jobs/561989031 , but I can also reproduce this locally.
Some further testing shows that os.utime even with the ns parameter only sets to full seconds on macOS 10.14. It works on earlier versions.
Right now I can't say whether this is a Python or OS limitation.
@zas: Do you think we really need the millisecond precision here? Do you think it would be sufficient to alter the test to check only for full seconds (we could still keep setting milliseconds in place).
=================================== FAILURES ===================================
____________________ TestPreserveTimes.test_preserve_times _____________________
self = <test.test_file.TestPreserveTimes testMethod=test_preserve_times>
- test if times are preserved
(before_atime_ns, before_mtime_ns) = self.file._preserve_times(self.file.filename, self._modify_testfile)
- HERE an external access to the file is possible, modifying its access time
- read times again and compare with original
st = os.stat(self.file.filename)
(after_atimes_ns, after_mtimes_ns) = (st.st_atime_ns, st.st_mtime_ns)
- modification times should be equal
> self.assertEqual(before_mtime_ns, after_mtimes_ns)
E AssertionError: 1563786391262226468 != 1563786391262226000