summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-10-18 19:34:00 (GMT)
committerFred Drake <fdrake@acm.org>2001-10-18 19:34:00 (GMT)
commitc10039c0110f75ceb0065df56a0409cc1e635958 (patch)
treec1e9532234d91b49f162e4d8879d81d40d0673d0 /Lib
parent397a654791e6bc8b108945e45e7d1393cc6f32d4 (diff)
downloadcpython-c10039c0110f75ceb0065df56a0409cc1e635958.zip
cpython-c10039c0110f75ceb0065df56a0409cc1e635958.tar.gz
cpython-c10039c0110f75ceb0065df56a0409cc1e635958.tar.bz2
Do not expect line number events when running under "python -O".
The right fix is to generate line number events anyway ;-), but this will have to do for now.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_hotshot.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py
index 84af776..7188f1b 100644
--- a/Lib/test/test_hotshot.py
+++ b/Lib/test/test_hotshot.py
@@ -53,6 +53,9 @@ class HotShotTestCase(unittest.TestCase):
def check_events(self, expected):
events = self.get_events_wotime()
+ if not __debug__:
+ # Running under -O, so we don't get LINE events
+ expected = [ev for ev in expected if ev[0] != LINE]
if events != expected:
self.fail(
"events did not match expectation; got:\n%s\nexpected:\n%s"