Skip to content

Commit bfb3839

Browse files
committed
Apply RustPython patch
1 parent 9622114 commit bfb3839

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_os.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,9 @@ def ns_to_sec(ns):
829829
# Convert a number of nanosecond (int) to a number of seconds (float).
830830
# Round towards infinity by adding 0.5 nanosecond to avoid rounding
831831
# issue, os.utime() rounds towards minus infinity.
832-
return (ns * 1e-9) + 0.5e-9
832+
# XXX: RUSTPYTHON os.utime() use `[Duration::from_secs_f64](https://doc.rust-lang.org/std/time/struct.Duration.html#method.try_from_secs_f64)`
833+
# return (ns * 1e-9) + 0.5e-9
834+
return (ns * 1e-9)
833835

834836
def test_utime_by_indexed(self):
835837
# pass times as floating-point seconds as the second indexed parameter

0 commit comments

Comments
 (0)