%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/python/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/python/test/__pycache__/test_runtime.cpython-312.pyc |
� Ϫ�f� � � � d Z ddlZddlmZ ddlmZmZ ddlmZ ddl m Z G d� de� Z G d � d e� Z G d� de� Z G d � de� Zy)z& Tests for L{twisted.python.runtime}. � N)�namedModule)�Platform�shortPythonVersion)�SynchronousTestCase)�suppressc � � e Zd ZdZdd�Zy)�PythonVersionTestsz. Tests the shortPythonVersion method. Nc � � t � j d� }t d� D ]1 }| j t || � t j | � �3 y)zE Verify if the Python version is returned correctly. �.� N)r �split�range�assertEqual�int�sys�version_info)�self�ver�is �B/usr/lib/python3/dist-packages/twisted/python/test/test_runtime.py�test_shortPythonVersionz*PythonVersionTests.test_shortPythonVersion sM � � !�"�(�(��-���q�� ?�A����S��Q��[�#�*:�*:�1�*=�>� ?� ��returnN)�__name__� __module__�__qualname__�__doc__r � r r r r s � ��?r r c �l � e Zd ZdZdZdd�Zdd�Zdd�Zdd�Zdd�Z e ee� � ge _ dd �Z dd�Zy) � PlatformTestsz8 Tests for the default L{Platform} initializer. zgtwisted.python.runtime.Platform.isWinNT was deprecated in Twisted 13.0. Use Platform.isWindows instead.Nc �V � t � }| j |j � � y)z� L{Platform.isKnown} returns a boolean indicating whether this is one of the L{runtime.knownPlatforms}. N)r � assertTrue�isKnown�r �platforms r �test_isKnownzPlatformTests.test_isKnown) s � � �:������(�(�*�+r c �� � t � }|j � r^| j |j � � | j |j � � | j |j � � yy)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% s r �test_isVistaConsistencyz%PlatformTests.test_isVistaConsistency1 s] � � �:�������O�O�H�,�,�.�/��O�O�H�.�.�0�1����X�.�.�0�1� r c �z � t � }|j � r!| j |j � d� yy)zq L{Platform.isMacOSX} can only return C{True} if L{Platform.getType} returns C{'posix'}. �posixN)r r- r �getTyper% s r �test_isMacOSXConsistencyz&PlatformTests.test_isMacOSXConsistency<