| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/idlelib/idle_test/__pycache__/ |
Upload File : |
�
���g� � �P � d Z ddlmZ G d� d� Z G d� d� Z G d� d� Zy )
zqMock classes that imitate idlelib modules or classes.
Attributes and methods will be added as needed for tests.
� )�Textc � � e Zd ZdZdd�Zd� Zy)�FuncaZ Record call, capture args, return/raise result set by test.
When mock function is called, set or use attributes:
self.called - increment call number even if no args, kwds passed.
self.args - capture positional arguments.
self.kwds - capture keyword arguments.
self.result - return or raise value set in __init__.
self.return_self - return self instead, to mock query class return.
Most common use will probably be to mock instance methods.
Given class instance, can set and delete as instance attribute.
Mock_tk.Var and Mbox_func are special variants of this.
Nc �J � d| _ || _ || _ d | _ d | _ y )Nr )�called�result�return_self�args�kwds)�selfr r s �0C:\Python312\\Lib\idlelib\idle_test\mock_idle.py�__init__z
Func.__init__ s&