| Server IP : 89.117.53.150 / Your IP : 216.73.216.11 Web Server : Apache System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : iscmbt-kufa-atu ( 1014) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/python/test/__pycache__/ |
Upload File : |
o
�b8 � @ s� d Z ddlZddlmZ ddlmZmZ ddlmZ ddl m
Z G dd� de�ZG d d
� d
e�Z
G dd� de�ZG d
d� de�ZdS )z&
Tests for L{twisted.python.runtime}.
� N)�namedModule)�Platform�shortPythonVersion)�SynchronousTestCase)�suppressc @ s e Zd ZdZdd� ZdS )�PythonVersionTestsz.
Tests the shortPythonVersion method.
c C s8 t � �d�}td�D ]}| �t|| �tj| � q
dS )zE
Verify if the Python version is returned correctly.
�.� N)r �split�range�assertEqual�int�sys�version_info)�self�ver�i� r �B/usr/lib/python3/dist-packages/twisted/python/test/test_runtime.py�test_shortPythonVersion s �z*PythonVersionTests.test_shortPythonVersionN)�__name__�
__module__�__qualname__�__doc__r r r r r r s r c @ s\ e Zd ZdZdZdd� Zdd� Zdd� Zd d
� Zdd� Z e
eed
�ge _dd� Z
dd� ZdS )�
PlatformTestsz8
Tests for the default L{Platform} initializer.
zgtwisted.python.runtime.Platform.isWinNT was deprecated in Twisted 13.0. Use Platform.isWindows instead.c C s t � }| �|�� � dS )z�
L{Platform.isKnown} returns a boolean indicating whether this is one of
the L{runtime.knownPlatforms}.
N)r �
assertTrue�isKnown�r �platformr r r �test_isKnown) s zPlatformTests.test_isKnownc C s@ t � }|�� r| �|�� � | �|�� � | �|�� � dS dS )z�
Verify consistency of L{Platform.isVista}: it can only be C{True} if
L{Platform.isWinNT} and L{Platform.isWindows} are C{True}.
N)r �isVistar �isWinNT� isWindows�assertFalse�isMacOSXr r r r �test_isVistaConsistency1 s �z%PlatformTests.test_isVistaConsistencyc C s&