mirror of
https://github.com/python/cpython.git
synced 2024-12-04 23:34:42 +08:00
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.
This commit is contained in:
parent
397a654791
commit
c10039c011
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user