MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / test_as_fraction

Method test_as_fraction

tests/test_z3_ported.py:3196–3201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3194 assert r.denominator_as_long() == 11
3195
3196 def test_as_fraction(self):
3197 from fractions import Fraction
3198
3199 r = RatVal(1, 3)
3200 f = r.as_fraction()
3201 assert f == Fraction(1, 3)
3202
3203 def test_as_string(self):
3204 r = RatVal(1, 3)

Callers

nothing calls this directly

Calls 2

RatValFunction · 0.90
as_fractionMethod · 0.45

Tested by

no test coverage detected