MCPcopy Create free account
hub / github.com/apache/arrow / check_mtime

Function check_mtime

python/pyarrow/tests/test_fs.py:492–501  ·  view source on GitHub ↗
(file_info)

Source from the content-addressed store, hash-verified

490
491
492def check_mtime(file_info):
493 assert isinstance(file_info.mtime, datetime)
494 assert isinstance(file_info.mtime_ns, int)
495 assert file_info.mtime_ns >= 0
496 assert file_info.mtime_ns == pytest.approx(
497 file_info.mtime.timestamp() * 1e9)
498 # It's an aware UTC datetime
499 tzinfo = file_info.mtime.tzinfo
500 assert tzinfo is not None
501 assert tzinfo.utcoffset(None) == timedelta(0)
502
503
504def check_mtime_absent(file_info):

Callers 4

check_mtime_or_absentFunction · 0.85
test_get_file_infoFunction · 0.85
test_localfs_file_infoFunction · 0.85

Calls 1

utcoffsetMethod · 0.45

Tested by

no test coverage detected