Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ trunc
Method
trunc
Lib/test/test_os/test_os.py:667–667 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
665
attr = name.lower()
666
if
name.endswith(
"TIME"
):
667
def
trunc(x):
return
int(x)
668
else
:
669
def
trunc(x):
return
x
670
self.assertEqual(trunc(getattr(result, attr)),
Callers
6
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
Calls
no outgoing calls
Tested by
no test coverage detected