Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
PRESUBMIT_test_mocks.MockFile Class Reference
+ Inheritance diagram for PRESUBMIT_test_mocks.MockFile:
+ Collaboration diagram for PRESUBMIT_test_mocks.MockFile:

Public Member Functions

 __init__ (self, local_path, new_contents=None, old_contents=None, action='A')
 
 ChangedContents (self)
 
 LocalPath (self)
 

Protected Attributes

 _local_path = local_path
 
 _new_contents = new_contents
 
list _changed_contents = [(i + 1, l) for i, l in enumerate(new_contents)]
 
 _action = action
 
 _old_contents = old_contents
 

Detailed Description

Mock class for the File class.

This class can be used to form the mock list of changed files in
MockInputApi for presubmit unittests.

Definition at line 54 of file PRESUBMIT_test_mocks.py.

Constructor & Destructor Documentation

◆ __init__()

PRESUBMIT_test_mocks.MockFile.__init__ ( self,
local_path,
new_contents = None,
old_contents = None,
action = 'A' )

Definition at line 61 of file PRESUBMIT_test_mocks.py.

Member Function Documentation

◆ ChangedContents()

PRESUBMIT_test_mocks.MockFile.ChangedContents ( self)

◆ LocalPath()

PRESUBMIT_test_mocks.MockFile.LocalPath ( self)

Definition at line 77 of file PRESUBMIT_test_mocks.py.

References PRESUBMIT_test_mocks.MockFile._local_path.

Member Data Documentation

◆ _action

PRESUBMIT_test_mocks.MockFile._action = action
protected

Definition at line 71 of file PRESUBMIT_test_mocks.py.

◆ _changed_contents

list PRESUBMIT_test_mocks.MockFile._changed_contents = [(i + 1, l) for i, l in enumerate(new_contents)]
protected

◆ _local_path

PRESUBMIT_test_mocks.MockFile._local_path = local_path
protected

Definition at line 66 of file PRESUBMIT_test_mocks.py.

Referenced by PRESUBMIT_test_mocks.MockFile.LocalPath().

◆ _new_contents

PRESUBMIT_test_mocks.MockFile._new_contents = new_contents
protected

Definition at line 69 of file PRESUBMIT_test_mocks.py.

◆ _old_contents

PRESUBMIT_test_mocks.MockFile._old_contents = old_contents
protected

Definition at line 72 of file PRESUBMIT_test_mocks.py.


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