Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
PRESUBMIT_test_mocks.MockChange Class Reference
Inheritance diagram for PRESUBMIT_test_mocks.MockChange:

Public Member Functions

 __init__ (self, changed_files)
 
 LocalPaths (self)
 
 AffectedFiles (self, include_dirs=False, include_deletes=True, file_filter=None)
 
 GitFootersFromDescription (self)
 

Public Attributes

 author_email
 
 footers
 

Protected Attributes

 _changed_files
 

Detailed Description

Mock class for Change class.

This class can be used in presubmit unittests to mock the query of the
current change.

Definition at line 265 of file PRESUBMIT_test_mocks.py.

Constructor & Destructor Documentation

◆ __init__()

PRESUBMIT_test_mocks.MockChange.__init__ (   self,
  changed_files 
)

Definition at line 272 of file PRESUBMIT_test_mocks.py.

272 def __init__(self, changed_files):
273 self._changed_files = changed_files
274 self.author_email = None
275 self.footers = defaultdict(list)
276

Member Function Documentation

◆ AffectedFiles()

PRESUBMIT_test_mocks.MockChange.AffectedFiles (   self,
  include_dirs = False,
  include_deletes = True,
  file_filter = None 
)

Definition at line 280 of file PRESUBMIT_test_mocks.py.

281 file_filter=None):
282 return self._changed_files
283

◆ GitFootersFromDescription()

PRESUBMIT_test_mocks.MockChange.GitFootersFromDescription (   self)

Definition at line 284 of file PRESUBMIT_test_mocks.py.

284 def GitFootersFromDescription(self):
285 return self.footers

◆ LocalPaths()

PRESUBMIT_test_mocks.MockChange.LocalPaths (   self)

Definition at line 277 of file PRESUBMIT_test_mocks.py.

277 def LocalPaths(self):
278 return self._changed_files
279

Member Data Documentation

◆ _changed_files

PRESUBMIT_test_mocks.MockChange._changed_files
protected

Definition at line 273 of file PRESUBMIT_test_mocks.py.

◆ author_email

PRESUBMIT_test_mocks.MockChange.author_email

Definition at line 274 of file PRESUBMIT_test_mocks.py.

◆ footers

PRESUBMIT_test_mocks.MockChange.footers

Definition at line 275 of file PRESUBMIT_test_mocks.py.


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