Nexus File Manager
v2.0
🏠
Dashboard
⚡
System
🌐
›
opt
›
alt
›
python38
›
lib64
›
python3.8
›
test
›
__pycache__
Quick:
⬆️ Parent
🌐 Root
🏠 Home
🌍 WWW
📁 Temp
⚙️ Etc
📤 Upload
📁 Create
⚡ WordPress Admin
🔄 Refresh
✏️ test_bigaddrspace.cpython-38.opt-1.pyc
← Back
U i�f� � @ s� d Z ddlmZ ddlmZmZ ddlZddlZddlZG dd� dej �Z G dd� dej �Zd d � Ze dkr�eej�dkr�e�ejd � e� 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 s. z"dt d }| �ttj|d� W 5 d }X d S �N� x� s� xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r �assertRaises� OverflowError�operator�add��self�x� r �;/opt/alt/python38/lib64/python3.8/test/test_bigaddrspace.py�test_concat s zBytesTest.test_concatc C sX zLdt d }| �t��}|d }W 5 Q R X | �t��}|d7 }W 5 Q R X W 5 d }X d S r )r r r �r r �cmr r r �test_optimized_concat s zBytesTest.test_optimized_concatc C s. z"dt d }| �ttj|d� W 5 d }X d S )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 @ sB e Zd Zejdk rdndZedd� �Zedd� �Zedd � �Z d S )�StrTesti � � c C s8 z,dt td| j � }| �ttj||� W 5 d }X d S �Nr 皙�����?)�intr �unicodesizer �MemoryErrorr r r r r r r <