Skip to content

Commit 15ea3d5

Browse files
committed
[3.12] pythongh-106193: Rename and fix duplicated tests in test_monitoring (pythonGH-109139)
(cherry picked from commit ea530f2) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 72b0f0e commit 15ea3d5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Lib/test/test_monitoring.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ def func1():
11681168
('instruction', 'func1', 14),
11691169
('line', 'get_events', 11)])
11701170

1171-
class TestInstallIncrementallly(MonitoringTestBase, unittest.TestCase):
1171+
class TestInstallIncrementally(MonitoringTestBase, unittest.TestCase):
11721172

11731173
def check_events(self, func, must_include, tool=TEST_TOOL, recorders=(ExceptionRecorder,)):
11741174
try:
@@ -1197,19 +1197,19 @@ def func1():
11971197

11981198
MUST_INCLUDE_LI = [
11991199
('instruction', 'func1', 2),
1200-
('line', 'func1', 1),
1200+
('line', 'func1', 2),
12011201
('instruction', 'func1', 4),
12021202
('instruction', 'func1', 6)]
12031203

12041204
def test_line_then_instruction(self):
12051205
recorders = [ LineRecorder, InstructionRecorder ]
12061206
self.check_events(self.func1,
1207-
recorders = recorders, must_include = self.EXPECTED_LI)
1207+
recorders = recorders, must_include = self.MUST_INCLUDE_LI)
12081208

12091209
def test_instruction_then_line(self):
1210-
recorders = [ InstructionRecorder, LineRecorderLowNoise ]
1210+
recorders = [ InstructionRecorder, LineRecorder ]
12111211
self.check_events(self.func1,
1212-
recorders = recorders, must_include = self.EXPECTED_LI)
1212+
recorders = recorders, must_include = self.MUST_INCLUDE_LI)
12131213

12141214
@staticmethod
12151215
def func2():
@@ -1224,12 +1224,12 @@ def func2():
12241224

12251225

12261226

1227-
def test_line_then_instruction(self):
1227+
def test_call_then_instruction(self):
12281228
recorders = [ CallRecorder, InstructionRecorder ]
12291229
self.check_events(self.func2,
12301230
recorders = recorders, must_include = self.MUST_INCLUDE_CI)
12311231

1232-
def test_instruction_then_line(self):
1232+
def test_instruction_then_call(self):
12331233
recorders = [ InstructionRecorder, CallRecorder ]
12341234
self.check_events(self.func2,
12351235
recorders = recorders, must_include = self.MUST_INCLUDE_CI)

0 commit comments

Comments
 (0)