%PDF- %PDF-
Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/ctypes/test/ |
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyc |
� 5}�ac @ s� d Z d d l Z d d l Z d d l Td d l Z d e j f d � � YZ d e j f d � � YZ e d k r e j � n d S( s. A testcase which accesses *values* in a dll. i����N( t *t ValuesTestCasec B s e Z d � Z d � Z RS( c C sm t t j � } t j | d � } | j } | j | | j � � | j d 9_ | j | d | j � � d S( Nt an_integeri ( t CDLLt _ctypes_testt __file__t c_intt in_dllt valuet assertEqualt get_an_integer( t selft ctdllR t x( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyt test_an_integer s c C s, t t j � } | j t t j | d � d S( Nt Undefined_Symbol( R R R t assertRaisest ValueErrorR R ( R R ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyt test_undefined s ( t __name__t __module__R R ( ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyR s t PythonValuesTestCasec B s) e Z d Z d � Z d � Z d � Z RS( s? This test only works when python itself is a dll/shared libraryc C s) t j t d � j } | j | d � d S( Nt Py_OptimizeFlagi ( R R t pythonapiR R ( R t opt( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyt test_optimizeflag s c C s� d t f d � � Y} t | � } | j t d � } g } x: | D]2 } | j d k rZ Pn | j | j | j f � qA Wd d d g } | j | | � d d l m } | | =d S( Nt struct_frozenc B s/ e Z d e f d e e � f d e f g Z RS( t namet codet size( R R t c_char_pt POINTERt c_ubyteR t _fields_( ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyR 5 s t PyImport_FrozenModulest __hello__ih t __phello__i����s __phello__.spami����( t _pointer_type_cache( R# ih ( R$ i����( s __phello__.spamih ( t StructureR R R R t Nonet appendR R t ctypesR% ( R R t FrozenTablet ftt itemst entryt expectedR% ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyt test_frozentable, s c C s | j t t j t d � d S( NR ( R R R R R ( R ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyR N s ( R R t __doc__R R/ R ( ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyR s "t __main__( R0 t unittestt sysR) R t TestCaseR R R t main( ( ( s@ /opt/plesk/python/2.7/lib64/python2.7/ctypes/test/test_values.pyt <module> s 9