summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-09-16 14:26:01 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-09-16 14:26:01 (GMT)
commitef1166ee81a50aa739cbcb164c9194dc75ae0cd5 (patch)
treef0dcea3bb5e1b748314eee9aa77e1b6fe176952d /Lib
parentf01611979bc7616d65bae5bdffce8a409d7aa465 (diff)
downloadcpython-ef1166ee81a50aa739cbcb164c9194dc75ae0cd5.zip
cpython-ef1166ee81a50aa739cbcb164c9194dc75ae0cd5.tar.gz
cpython-ef1166ee81a50aa739cbcb164c9194dc75ae0cd5.tar.bz2
Issue 9315: Removed list comprehention test.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_trace.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index b54e5c7..2bb1f33 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -70,12 +70,6 @@ def traced_func_calling_generator():
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 @@ class TestLineCounts(unittest.TestCase):
}
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