%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/test_codeop.pyo |
ó Nêáac @ s¤ d Z d d l Z d d l m Z m Z d d l m Z m Z e rh d d l Z d d l Z d „ Z n d e j f d „ ƒ YZ d „ Z e d k r e ƒ n d S( s/ Test cases for codeop.py Nick Mathewson iÿÿÿÿN( t run_unittestt is_jython( t compile_commandt PyCF_DONT_IMPLY_DEDENTc C s: x3 | j ƒ D]% \ } } t | ƒ r t | | <q q W| S( N( t itemst callable( t dt nt v( ( s, /usr/local/lib/python2.7/test/test_codeop.pyt unify_callables s t CodeopTestsc B sS e Z d d „ Z d d „ Z d d d „ Z d „ Z d „ Z d „ Z d „ Z RS( t singlec B s" e rí e | d | ƒ } | j | ƒ | d k r† i i } } e j } e j ƒ e _ z | | Ue | d d ƒ | UWd | e _ XnH | d k rÎ i d d 6} i e | | ƒ d 6} i e | | ƒ d 6} n | j e | ƒ e | ƒ ƒ n1 e | d | e ƒ } | j e | d | ƒ | ƒ d S( s( succeed iff str is a valid piece of codes <input>R Nt evali t at value( R R t assertTruet syst stdoutt cStringIOt StringIOt compileR t assertEqualR R ( t selft strt symbolt codeR t rt saved_stdoutt ctxt expected( ( s, /usr/local/lib/python2.7/test/test_codeop.pyt assertValid s$ c C s | j t | d | ƒd ƒ d S( s5 succeed iff str is the start of a valid piece of codeR N( R R t None( R R R ( ( s, /usr/local/lib/python2.7/test/test_codeop.pyt assertIncomplete- s i c C sd y! t | d | ƒ| j d ƒ Wn<