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

Method parse

Lib/test/test_str.py:2730–2731  ·  view source on GitHub ↗
(format)

Source from the content-addressed store, hash-verified

2728class StringModuleTest(unittest.TestCase):
2729 def test_formatter_parser(self):
2730 def parse(format):
2731 return list(_string.formatter_parser(format))
2732
2733 formatter = parse("prefix {2!s}xxx{0:^+10.3f}{obj.attr!s} {z[0]!s:10}")
2734 self.assertEqual(formatter, [

Calls 1

listClass · 0.85

Tested by

no test coverage detected