]> granicus.if.org Git - python/commitdiff
test for set literals
authorBenjamin Peterson <benjamin@python.org>
Sun, 11 Jul 2010 12:59:24 +0000 (12:59 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 11 Jul 2010 12:59:24 +0000 (12:59 +0000)
Lib/test/test_ast.py

index 07697acbf225fe8cf18e99a70a596d853de8643e..e05078461b1468d844b29f732aae0f4852202971 100644 (file)
@@ -285,6 +285,7 @@ class ASTHelpers_Test(unittest.TestCase):
         self.assertEqual(ast.literal_eval('[1, 2, 3]'), [1, 2, 3])
         self.assertEqual(ast.literal_eval('{"foo": 42}'), {"foo": 42})
         self.assertEqual(ast.literal_eval('(True, False, None)'), (True, False, None))
+        self.assertEqual(ast.literal_eval('{1, 2, 3}'), {1, 2, 3})
         self.assertRaises(ValueError, ast.literal_eval, 'foo()')
 
     def test_literal_eval_issue4907(self):