|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/test/__pycache__/ |
U
>��g� � @ sb d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ G dd� dej�Z e
dkr^e�� dS )� N)�supportc @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z d)dd�Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Ze�ejdkd�d d!� �Zd"d#� Zd$d%� Zd&d'� Zd(S )*�
NetrcTestCasec C sh t �|�}d}tjdkr |d7 }t�� \}}tj||d��}|�|� W 5 Q R X | � tj
|� t�|�S )N�w�cygwin�t)�mode)�textwrap�dedent�sys�platform�tempfile�mkstemp�os�fdopen�write�
addCleanup�unlink�netrc)�selfZ test_datar Ztemp_fdZ
temp_filename�fp� r �./opt/cppython/lib/python3.8/test/test_netrc.py�make_nrc s
zNetrcTestCase.make_nrcc C sP | � d�}| �|jd d� | �|jd d� | � |�� �}| �|j|j� d S )Nz� machine host1.domain.com login log1 password pass1 account acct1
default login log2 password pass2
zhost1.domain.com)Zlog1Zacct1Zpass1�default)�log2NZpass2)r �assertEqual�hosts�__repr__)r �nrcZnrc2r r r �test_default s
�zNetrcTestCase.test_defaultc C s* | � d�}| �|jddgddgd�� d S )Nz� macdef macro1
line1
line2
macdef macro2
line3
line4
zline1
zline2
zline3
zline4
)Zmacro1Zmacro2)r r Zmacros)r r r r r �test_macros s
�zNetrcTestCase.test_macrosc C s&