summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_hotshot.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_hotshot.py')
-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"