Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ trunc
Method
trunc
Lib/test/test_os.py:656–656 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
654
attr = name.lower()
655
if
name.endswith(
"TIME"
):
656
def
trunc(x):
return
int(x)
657
else
:
658
def
trunc(x):
return
x
659
self.assertEqual(trunc(getattr(result, attr)),
Callers
15
testConversions
Method · 0.80
testBigFloatComparisons
Method · 0.80
test_trunc
Method · 0.80
test_trunc
Method · 0.80
test_asyncmock_defaults
Method · 0.80
test_magicmock_defaults
Method · 0.80
builtin_float.py
File · 0.80
stdlib_math.py
File · 0.80
builtin_int.py
File · 0.80
sec_to_timeval
Function · 0.80
format_complex_float
Method · 0.80
round_float_digits
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected