Skip to content

Random testFileTimes test failure in test_win32file.py #2203

@Avasam

Description

@Avasam

This isn't the first time it happens to me, but is very rare. I haven't looked into it yet, but probably related to time precision, or obtaining "current time" twice leading to a few ticks of difference.

https://github.com/mhammond/pywin32/actions/runs/8283474275/job/22666727095?pr=2145#step:6:292

FAIL: testFileTimes (test_win32file.TestSimpleOps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pywin32\pywin32\win32\test\test_win32file.py", line 234, in testFileTimes
    self.assertTrue(now <= ct <= nowish, (now, ct))
AssertionError: False is not true : (datetime.datetime(2024, 3, 14, 15, 43, 53, tzinfo=TimeZoneInfo('GMT Standard Time', True)), pywintypes.datetime(2024, 3, 14, 15, 43, 54, 17000, tzinfo=TimeZoneInfo('GMT Standard Time', True)))

This is a different issue than #2080

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions