FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-106193: Rename and fix duplicated tests in `test_monitoring` by hugovk · Pull Request #109139 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
14 changes: 7 additions & 7 deletions Lib/test/test_monitoring.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ def line(*args):
sys.monitoring.set_events(TEST_TOOL, 0)
self.assertGreater(len(events), 0)

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 @@ -1198,19 +1198,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 @@ -1225,12 +1225,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

Back | FazBrowse Home | New Git URL