| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.10/test/__pycache__/ |
Upload File : |
o
�9jR � @ s� d Z ddlmZ ddlmZmZ ddlZddlZddlZG dd� dej �Z
G dd� dej �Zed krGe
ej�d
krAe�ejd
� e�� dS dS )aT
These tests are meant to exercise that requests to create objects bigger
than what the address space allows are properly met with an OverflowError
(rather than crash weirdly).
Primarily, this means 32-bit builds with at least 2 GiB of available memory.
You need to pass the -M option to regrtest (e.g. "-M 2.1G") for tests to
be enabled.
� )�support)�bigaddrspacetest�MAX_Py_ssize_tNc @ s0 e Zd Zedd� �Zedd� �Zedd� �ZdS )� BytesTestc C s0 zdt d }| �ttj|d� W d }d S d }w �N� x� s� xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r �assertRaises�
OverflowError�operator�add��self�x� r �-/usr/lib/python3.10/test/test_bigaddrspace.py�test_concat s zBytesTest.test_concatc C s� zBdt d }| �t��}|d }W d � n1 sw Y | �t��}|d7 }W d � n
1 s4w Y W d }d S W d }d S d }w r )r r r
�r r �cmr r r �test_optimized_concat s
�
��zBytesTest.test_optimized_concatc C s0 zdt d }| �ttj|d� W d }d S d }w )Nr r )r r r
r �mulr
r r r �test_repeat/ s zBytesTest.test_repeatN)�__name__�
__module__�__qualname__r r r r r r r r r s
r c @ s4 e Zd ZdZedd� �Zedd� �Zedd� �ZdS ) �StrTest� c C s: zdt td| j � }| �ttj||� W d }d S d }w �Nr 皙�����?)�intr �unicodesizer �MemoryErrorr r r
r r r r <