[Python-checkins] r84848 - python/branches/release31-maint/Lib/test/test_trace.py

alexander.belopolsky python-checkins at python.org
Thu Sep 16 16:26:07 CEST 2010


Author: alexander.belopolsky
Date: Thu Sep 16 16:26:01 2010
New Revision: 84848

Log:
Issue 9315: Removed list comprehention test.

Modified:
   python/branches/release31-maint/Lib/test/test_trace.py

Modified: python/branches/release31-maint/Lib/test/test_trace.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_trace.py	(original)
+++ python/branches/release31-maint/Lib/test/test_trace.py	Thu Sep 16 16:26:01 2010
@@ -70,12 +70,6 @@
 def traced_doubler(num):
     return num * 2
 
-def traced_caller_list_comprehension():
-    k = 10
-    mylist = [traced_doubler(i) for i in range(k)]
-    return mylist
-
-
 class TracedClass(object):
     def __init__(self, x):
         self.a = x
@@ -156,22 +150,6 @@
         }
         self.assertEqual(self.tracer.results().counts, expected)
 
-    def test_trace_list_comprehension(self):
-        self.tracer.runfunc(traced_caller_list_comprehension)
-
-        firstlineno_calling = get_firstlineno(traced_caller_list_comprehension)
-        firstlineno_called = get_firstlineno(traced_doubler)
-        expected = {
-            (self.my_py_filename, firstlineno_calling + 1): 1,
-            # List compehentions work differently in 3.x, so the count
-            # below changed compared to 2.x.
-            (self.my_py_filename, firstlineno_calling + 2): 12,
-            (self.my_py_filename, firstlineno_calling + 3): 1,
-            (self.my_py_filename, firstlineno_called + 1): 10,
-        }
-        self.assertEqual(self.tracer.results().counts, expected)
-
-
     def test_linear_methods(self):
         # XXX todo: later add 'static_method_linear' and 'class_method_linear'
         # here, once issue1764286 is resolved


More information about the Python-checkins mailing list