
    Vh	                     x    d Z ddlmZmZ ddlmZ  G d dej                        Z G d dej                        Zy)	z$
Tests for L{twisted.python.win32}.
    )reflectwin32)unittestc                   (    e Zd ZdZddZddZddZy)CommandLineQuotingTestsz$
    Tests for L{cmdLineQuote}.
    Nc                 N    | j                  t        j                  d      d       y)zq
        Calling C{cmdLineQuote} with an argument with no spaces returns
        the argument unchanged.
        an_argumentNassertEqualr   cmdLineQuoteselfs    N/home/dcms/DCMS/lib/python3.12/site-packages/twisted/python/test/test_win32.pytest_argWithoutSpacesz-CommandLineQuotingTests.test_argWithoutSpaces   s    
 	++M:MJ    c                 N    | j                  t        j                  d      d       y)z
        Calling C{cmdLineQuote} with an argument containing spaces returns
        the argument surrounded by quotes.
        zAn Argumentz"An Argument"Nr
   r   s    r   test_argWithSpacesz*CommandLineQuotingTests.test_argWithSpaces   s    
 	++M:OLr   c                 N    | j                  t        j                  d      d       y)ze
        Calling C{cmdLineQuote} with an empty string returns a quoted empty
        string.
         z""Nr
   r   s    r   test_emptyStringArgz+CommandLineQuotingTests.test_emptyStringArg   s    
 	++B/6r   returnN)__name__
__module____qualname____doc__r   r   r    r   r   r   r      s    KM7r   r   c                        e Zd ZdZddZddZy)DeprecationTestsz2
    Tests for deprecated (Fake)WindowsError.
    Nc                 R    | j                  t        dt        j                  d        y)z?Importing C{FakeWindowsError} triggers a L{DeprecationWarning}.ztwisted.python.win32.FakeWindowsError was deprecated in Twisted 21.2.0: Catch OSError and check presence of 'winerror' attribute.c                  ,    t        j                  d      S )Nz%twisted.python.win32.FakeWindowsErrorr   namedAnyr   r   r   <lambda>zDDeprecationTests.test_deprecation_FakeWindowsError.<locals>.<lambda>4   s    G$$%LM r   NassertWarnsDeprecationWarningr   __file__r   s    r   !test_deprecation_FakeWindowsErrorz2DeprecationTests.test_deprecation_FakeWindowsError,   s'     	HM	
r   c                 R    | j                  t        dt        j                  d        y)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                  ,    t        j                  d      S )Nz!twisted.python.win32.WindowsErrorr"   r   r   r   r$   z@DeprecationTests.test_deprecation_WindowsError.<locals>.<lambda>?   s    G$$%HI r   Nr%   r   s    r   test_deprecation_WindowsErrorz.DeprecationTests.test_deprecation_WindowsError7   s'     	HI	
r   r   )r   r   r   r   r)   r,   r   r   r   r   r   '   s    	
	
r   r   N)	r   twisted.pythonr   r   twisted.trialr   TestCaser   r   r   r   r   <module>r0      s6    * "7h// 76
x(( 
r   