ok
Direktori : /usr/lib64/python2.7/site-packages/simplejson/tests/ |
Current File : //usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyc |
� ���Sc @� s� d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z y d d l m Z WnN e k r� y d d l m Z Wq� e k r� d d l Z d � Z q� Xn Xd e j f d � � YZ d S( i����( t with_statementN( t strip_python_stderrc C� s% t j d j � d j � | � j � S( Ns \[\d+ refs\]\r?\n?$t ( t ret subt encodet strip( t stderr( ( s@ /usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyR s t TestToolc B� sG e Z d Z e j d � Z d d d � Z d � Z d � Z d � Z RS( s� [["blorpie"],[ "whoops" ] , [ ], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", {"nifty":87}, {"morefield" : false,"field" :"yes"} ] s. [ [ "blorpie" ], [ "whoops" ], [], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", { "nifty": 87 }, { "field": "yes", "morefield": false } ] c C� s� t j d d g } | r( | j | � n t j | d t j d t j d t j �} | j | � \ } } | j t | � d j � � | j | j d � | S( Ns -ms simplejson.toolt stdinR t stdoutR i ( t syst executablet extendt subprocesst Popent PIPEt communicatet assertEqualR R t returncode( t selft argst datat argvt proct outt err( ( s@ /usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyt runTool7 s c C� s2 | j | j d | j j � � | j j � � d S( NR ( R R R R t expect( R ( ( s@ /usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyt test_stdin_stdoutD s c C� sd t j � �R } | j | j j � � | j � | j | j d | j g � | j j � � Wd QXd S( NR ( t tempfilet NamedTemporaryFilet writeR R t flushR R t nameR ( R t infile( ( s@ /usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyt test_infile_stdoutI s c C� s� t j � �� } | j | j j � � | j � t j � } zl | j | j d | j | j g � d j � � t | j d � �&