Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
PRESUBMIT_test.ReleaseNotesTest Class Reference
Inheritance diagram for PRESUBMIT_test.ReleaseNotesTest:

Public Member Functions

def testNoEditTopReleaseNotesNoWarning (self)
 
def testUpdateTopReleaseNotesIssuesWarning (self)
 
def testUpdateTopReleaseNotesNoWarning (self)
 
def testUpdatePublicHeaderAndNoReleaseNoteGeneratesWarning (self)
 
def testUpdatePublicHeaderAndReleaseNoteGeneratesNoWarning (self)
 

Detailed Description

Definition at line 18 of file PRESUBMIT_test.py.

Member Function Documentation

◆ testNoEditTopReleaseNotesNoWarning()

def PRESUBMIT_test.ReleaseNotesTest.testNoEditTopReleaseNotesNoWarning (   self)

Definition at line 19 of file PRESUBMIT_test.py.

19 def testNoEditTopReleaseNotesNoWarning(self):
20 mock_input_api = MockInputApi()
21 mock_input_api.files = [
22 MockFile('README.chromium', ''),
23 ]
24
25 mock_output_api = MockOutputApi()
27 mock_input_api, mock_output_api)
28
29 self.assertEqual(0, len(results))
30
def _CheckTopReleaseNotesChanged(input_api, output_api)
Definition: PRESUBMIT.py:629

◆ testUpdatePublicHeaderAndNoReleaseNoteGeneratesWarning()

def PRESUBMIT_test.ReleaseNotesTest.testUpdatePublicHeaderAndNoReleaseNoteGeneratesWarning (   self)

Definition at line 60 of file PRESUBMIT_test.py.

60 def testUpdatePublicHeaderAndNoReleaseNoteGeneratesWarning(self):
61 mock_input_api = MockInputApi()
62 mock_input_api.files = [
63 MockFile('include/core/SkDrawable.h', ''),
64 ]
65
66 mock_output_api = MockOutputApi()
68 mock_input_api, mock_output_api)
69
70 self.assertEqual(1, len(results))
71 self.assertIsInstance(
72 results[0], mock_output_api.PresubmitPromptWarning, 'Not a warning')
73
def _CheckReleaseNotesForPublicAPI(input_api, output_api)
Definition: PRESUBMIT.py:604

◆ testUpdatePublicHeaderAndReleaseNoteGeneratesNoWarning()

def PRESUBMIT_test.ReleaseNotesTest.testUpdatePublicHeaderAndReleaseNoteGeneratesNoWarning (   self)

Definition at line 74 of file PRESUBMIT_test.py.

74 def testUpdatePublicHeaderAndReleaseNoteGeneratesNoWarning(self):
75 mock_input_api = MockInputApi()
76 mock_input_api.files = [
77 MockFile('include/core/SkDrawable.h', ''),
78 MockFile('relnotes/new_note.md', ''),
79 ]
80
81 mock_output_api = MockOutputApi()
83 mock_input_api, mock_output_api)
84
85 self.assertEqual(0, len(results))
86
87

◆ testUpdateTopReleaseNotesIssuesWarning()

def PRESUBMIT_test.ReleaseNotesTest.testUpdateTopReleaseNotesIssuesWarning (   self)

Definition at line 31 of file PRESUBMIT_test.py.

31 def testUpdateTopReleaseNotesIssuesWarning(self):
32 mock_input_api = MockInputApi()
33 mock_input_api.files = [
34 MockFile('RELEASE_NOTES.md', ''),
35 ]
36
37 mock_output_api = MockOutputApi()
39 mock_input_api, mock_output_api)
40
41 self.assertEqual(1, len(results))
42 self.assertIsInstance(
43 results[0], mock_output_api.PresubmitPromptWarning, 'Not a warning')
44 self.assertTrue(results[0].message.startswith(
45 'Do not edit RELEASE_NOTES.md'))
46

◆ testUpdateTopReleaseNotesNoWarning()

def PRESUBMIT_test.ReleaseNotesTest.testUpdateTopReleaseNotesNoWarning (   self)

Definition at line 47 of file PRESUBMIT_test.py.

47 def testUpdateTopReleaseNotesNoWarning(self):
48 mock_input_api = MockInputApi()
49 mock_input_api.files = [
50 MockFile('RELEASE_NOTES.md', ''),
51 MockFile('relnotes/deleted_note.md', ''),
52 ]
53
54 mock_output_api = MockOutputApi()
56 mock_input_api, mock_output_api)
57
58 self.assertEqual(0, len(results))
59

The documentation for this class was generated from the following file: