simulator: Fix timestamps manipulation
It's unclear whether the change in this mr triggers the bug in the simulator. But it should be timestamp that needs manipulation and it's currently datetimes. So this makes the current state fails with [1] Adding the conversion layer from datetime to timestamps make the tests happier. [1] ``` 16:17:06 low = datetime.datetime(2025, 3, 14, 15, 17, 2, 139077, tzinfo=datetime.timezone.utc) 16:17:06 high = datetime.datetime(2025, 3, 14, 15, 17, 2, 139077, tzinfo=datetime.timezone.utc) 16:17:06 16:17:06 def _diff(low, high): 16:17:06 if low == high: 16:17:06 if low == 0: 16:17:06 return 0.5 16:17:06 else: 16:17:06 > return abs(low * 0.1) 16:17:06 E TypeError: unsupported operand type(s) for *: 'datetime.datetime' and 'float' 16:17:06 ``` Refs. swh/infra/sysadm-environment#5512
Loading
Please register or sign in to comment