macos/HFS+ cannot into floats

This commit is contained in:
ed
2026-03-21 23:49:09 +01:00
parent 311eb698a0
commit 1f8ebd57dc

View File

@@ -8,6 +8,7 @@ import tempfile
import time
import unittest
from copyparty.__init__ import MACOS
from copyparty.authsrv import AuthSrv
from copyparty.httpcli import HttpCli
from tests import util as tu
@@ -218,7 +219,8 @@ class TestHttpCli(TC):
# float x-oc-mtime should be accepted
h, b = self.req(RCLONE_PUT_FLOAT % ("a/fb",))
self.assertStart("HTTP/1.1 201 Created\r", h)
self.assertAlmostEqual(os.path.getmtime("a/fb"), 1689453578.123, places=3)
zi = 0 if MACOS else 3 # its okay macos you tried your best
self.assertAlmostEqual(os.path.getmtime("a/fb"), 1689453578.123, places=zi)
# then it does a propfind to confirm
h, b = self.req(RCLONE_PROPFIND % ("a/fa",))