mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-15 07:04:31 +03:00
Ignore directory mtimes when testing
They are flaky on CI for some reason
This commit is contained in:
parent
d718ab6edf
commit
bb897fa299
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import stat
|
||||||
import tempfile
|
import tempfile
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
@ -389,7 +390,10 @@ class TestFileTransmission(BaseTest):
|
|||||||
|
|
||||||
def entry(path, base=src):
|
def entry(path, base=src):
|
||||||
st = os.stat(path, follow_symlinks=False)
|
st = os.stat(path, follow_symlinks=False)
|
||||||
return Entry(os.path.relpath(path, base), st.st_mtime_ns, st.st_mode, st.st_nlink)
|
mtime = st.st_mtime_ns
|
||||||
|
if stat.S_ISDIR(st.st_mode):
|
||||||
|
mtime = 0 # mtime is flaky for dirs on CI even empty ones
|
||||||
|
return Entry(os.path.relpath(path, base), mtime, st.st_mode, st.st_nlink)
|
||||||
|
|
||||||
def se(path):
|
def se(path):
|
||||||
e = entry(path)
|
e = entry(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user