Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ Ratio
Class
Ratio
Lib/test/test_fractions.py:286–290 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
284
pass
285
286
class
Ratio:
287
def
__init__(self, ratio):
288
self._ratio = ratio
289
def
as_integer_ratio(self):
290
return
self._ratio
291
292
293
class
FractionTest(unittest.TestCase):
Callers
2
testInitFromIntegerRatio
Method · 0.85
testFromNumber
Method · 0.85
Calls
no outgoing calls
Tested by
2
testInitFromIntegerRatio
Method · 0.68
testFromNumber
Method · 0.68