[Python-checkins] r62818 - python/branches/tlee-ast-optimize/Lib/test/test_optimizer.py

thomas.lee python-checkins at python.org
Wed May 7 14:26:42 CEST 2008


Author: thomas.lee
Date: Wed May  7 14:26:41 2008
New Revision: 62818

Log:
Remove some useless tests.

Modified:
   python/branches/tlee-ast-optimize/Lib/test/test_optimizer.py

Modified: python/branches/tlee-ast-optimize/Lib/test/test_optimizer.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_optimizer.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_optimizer.py	Wed May  7 14:26:41 2008
@@ -155,25 +155,6 @@
         except TypeError:
             pass
 
-    def test_return_none_becomes_return(self):
-        code = """
-def foo():
-    return None
-"""
-        ast = self.compileast(code)
-        self.assertEqual(_ast.Return, ast.body[0].body[0].__class__)
-        self.assertEqual(None, ast.body[0].body[0].value)
-
-    def test_yield_none_becomes_yield(self):
-        code = """
-def foo():
-    yield None
-"""
-        ast = self.compileast(code)
-        self.assertEqual(_ast.Expr, ast.body[0].body[0].__class__)
-        self.assertEqual(_ast.Yield, ast.body[0].body[0].value.__class__)
-        self.assertEqual(None, ast.body[0].body[0].value.value)
-
     def test_eliminate_code_after_return(self):
         # ensure code following a "return" is erased from the AST
         code = """


More information about the Python-checkins mailing list