From 927c8ff4d83f65432fbbb42e5716092e1f1d2ef8 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 3 Oct 2024 22:23:12 -0400 Subject: [PATCH] tests: apply `os.utime` to created symlinks too Nanosecond precision is not universally available on all platforms. For example, nixpkgs python is built using Apple SDK 10.12 that does not have `utimensat`. Because of that, python `os.stat` falls back to microsecond precision. This patch applies `os.utime` with zeroed nanoseconds to symlinks created by the test case, the same way as it is already applied to other files tested for transfer. --- kitty_tests/file_transmission.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty_tests/file_transmission.py b/kitty_tests/file_transmission.py index a96ed4177..b661b8433 100644 --- a/kitty_tests/file_transmission.py +++ b/kitty_tests/file_transmission.py @@ -410,8 +410,10 @@ class TestFileTransmission(BaseTest): se(f.name) se(str(s)) os.symlink('/', b/'abssym') + os.utime(b/'abssym', (1234.5, 1234.5), follow_symlinks=False) se(b/'abssym') os.symlink('sub/reg', b/'sym') + os.utime(b/'sym', (6789.1, 6789.1), follow_symlinks=False) se(b/'sym') with self.run_kitten(list(cmd) + [src, dest]) as pty: