Skip to content

[3.12] gh-106193: Rename and fix duplicated tests in test_monitoring (GH-109139) #110897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Lib/test/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ def func1():
('instruction', 'func1', 14),
('line', 'get_events', 11)])

class TestInstallIncrementallly(MonitoringTestBase, unittest.TestCase):
class TestInstallIncrementally(MonitoringTestBase, unittest.TestCase):

def check_events(self, func, must_include, tool=TEST_TOOL, recorders=(ExceptionRecorder,)):
try:
Expand Down Expand Up @@ -1197,19 +1197,19 @@ def func1():

MUST_INCLUDE_LI = [
('instruction', 'func1', 2),
('line', 'func1', 1),
('line', 'func1', 2),
('instruction', 'func1', 4),
('instruction', 'func1', 6)]

def test_line_then_instruction(self):
recorders = [ LineRecorder, InstructionRecorder ]
self.check_events(self.func1,
recorders = recorders, must_include = self.EXPECTED_LI)
recorders = recorders, must_include = self.MUST_INCLUDE_LI)

def test_instruction_then_line(self):
recorders = [ InstructionRecorder, LineRecorderLowNoise ]
recorders = [ InstructionRecorder, LineRecorder ]
self.check_events(self.func1,
recorders = recorders, must_include = self.EXPECTED_LI)
recorders = recorders, must_include = self.MUST_INCLUDE_LI)

@staticmethod
def func2():
Expand All @@ -1224,12 +1224,12 @@ def func2():



def test_line_then_instruction(self):
def test_call_then_instruction(self):
recorders = [ CallRecorder, InstructionRecorder ]
self.check_events(self.func2,
recorders = recorders, must_include = self.MUST_INCLUDE_CI)

def test_instruction_then_line(self):
def test_instruction_then_call(self):
recorders = [ InstructionRecorder, CallRecorder ]
self.check_events(self.func2,
recorders = recorders, must_include = self.MUST_INCLUDE_CI)
Expand Down