MCPcopy Index your code
hub / github.com/bpython/bpython / test_matches_stdlib

Method test_matches_stdlib

bpython/test/test_simpleeval.py:17–21  ·  view source on GitHub ↗

Should match the stdlib literal_eval if no names or indexing

(self)

Source from the content-addressed store, hash-verified

15 self.assertEqual(ast.literal_eval(expr), simple_eval(expr))
16
17 def test_matches_stdlib(self):
18 """Should match the stdlib literal_eval if no names or indexing"""
19 self.assertMatchesStdlib("[1]")
20 self.assertMatchesStdlib("{(1,): [2,3,{}]}")
21 self.assertMatchesStdlib("{1, 2}")
22
23 @unittest.skipUnless(
24 sys.version_info[:2] >= (3, 9), "Only Python3.9 evaluates set()"

Callers

nothing calls this directly

Calls 1

assertMatchesStdlibMethod · 0.95

Tested by

no test coverage detected