U
     T‚g	  ã                   @   sH   d Z ddlmZmZ ddlmZ G dd„ dejƒZG dd„ dejƒZdS )	z$
Tests for L{twisted.python.win32}.
é    )ÚreflectÚwin32)Úunittestc                   @   s:   e Zd ZdZddœdd„Zddœdd„Zddœdd	„ZdS )
ÚCommandLineQuotingTestsz$
    Tests for L{cmdLineQuote}.
    N©Úreturnc                 C   s   |   t d¡d¡ dS )zq
        Calling C{cmdLineQuote} with an argument with no spaces returns
        the argument unchanged.
        Zan_argumentN©ÚassertEqualr   ZcmdLineQuote©Úself© r   úB/tmp/pip-unpacked-wheel-1_7di8ic/twisted/python/test/test_win32.pyÚtest_argWithoutSpaces   s    z-CommandLineQuotingTests.test_argWithoutSpacesc                 C   s   |   t d¡d¡ dS )z
        Calling C{cmdLineQuote} with an argument containing spaces returns
        the argument surrounded by quotes.
        zAn Argumentz"An Argument"Nr   r
   r   r   r   Útest_argWithSpaces   s    z*CommandLineQuotingTests.test_argWithSpacesc                 C   s   |   t d¡d¡ dS )ze
        Calling C{cmdLineQuote} with an empty string returns a quoted empty
        string.
        Ú z""Nr   r
   r   r   r   Útest_emptyStringArg   s    z+CommandLineQuotingTests.test_emptyStringArg)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s   r   c                   @   s,   e Zd ZdZddœdd„Zddœdd„ZdS )ÚDeprecationTestsz2
    Tests for deprecated (Fake)WindowsError.
    Nr   c                 C   s   |   tdtjdd„ ¡ dS )z?Importing C{FakeWindowsError} triggers a L{DeprecationWarning}.z�twisted.python.win32.FakeWindowsError was deprecated in Twisted 21.2.0: Catch OSError and check presence of 'winerror' attribute.c                   S   s
   t  d¡S )Nz%twisted.python.win32.FakeWindowsError©r   ZnamedAnyr   r   r   r   Ú<lambda>4   ó    zDDeprecationTests.test_deprecation_FakeWindowsError.<locals>.<lambda>N©ZassertWarnsÚDeprecationWarningr   Ú__file__r
   r   r   r   Ú!test_deprecation_FakeWindowsError,   s    ûz2DeprecationTests.test_deprecation_FakeWindowsErrorc                 C   s   |   tdtjdd„ ¡ dS )z;Importing C{WindowsError} triggers a L{DeprecationWarning}.z}twisted.python.win32.WindowsError was deprecated in Twisted 21.2.0: Catch OSError and check presence of 'winerror' attribute.c                   S   s
   t  d¡S )Nz!twisted.python.win32.WindowsErrorr   r   r   r   r   r   ?   r   z@DeprecationTests.test_deprecation_WindowsError.<locals>.<lambda>Nr   r
   r   r   r   Útest_deprecation_WindowsError7   s    ûz.DeprecationTests.test_deprecation_WindowsError)r   r   r   r   r   r   r   r   r   r   r   '   s   r   N)	r   Ztwisted.pythonr   r   Ztwisted.trialr   ZTestCaser   r   r   r   r   r   Ú<module>   s   