MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_side_effect_order

Method test_side_effect_order

Lib/test/test_fstring.py:863–872  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

861 exec(r'f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat})
862
863 def test_side_effect_order(self):
864 class X:
865 def __init__(self):
866 self.i = 0
867 def __format__(self, spec):
868 self.i += 1
869 return str(self.i)
870
871 x = X()
872 self.assertEqual(f'{x} {x}', '1 2')
873
874 @unittest.expectedFailure # TODO: RUSTPYTHON
875 def test_missing_expression(self):

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.95
XClass · 0.70

Tested by

no test coverage detected