Should match the stdlib literal_eval if no names or indexing
(self)
| 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()" |
nothing calls this directly
no test coverage detected