|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/lib64/python2.4/test/ |
Upload File : |
mς
=5Dc @ sμ d Z d k Z d k l Z d k Z d k Z d k Z d k Z d k Z d k l Z d Z d Z
d e
i d d d Z d
e i
f d YZ d e i
f d
YZ d e i
f d YZ d Z e d j o e n d S( s%
Tests for uu module.
Nick Mathewson
N( s test_support( s StringIOs5 The smooth-scaled python crept over the sleeping dog
sK M5&AE('-M;V]T:"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P
(:6YG(&1O9PH s begin %03o %s
t %s %%s
end
t UUTestc B s, t Z d Z d Z d Z d Z RS( Nc C s t i t } t i } t i | | d | i | i t
d t i t } t i } t i | | d d | i | i t
d d S( Nt t1iΆ i€ ( iΆ R ( i€ R ( t cStringIOt StringIOt plaintextt inpt outt uut encodet selft assertEqualt getvaluet encodedtextwrapped( R
R R ( ( t$ /usr/lib64/python2.4/test/test_uu.pyt test_encode s c C s t i t d } t i } t i | | | i | i t
t i d d t d } t i } t i | | | i | i t
d S( NiΆ R s( UUencoded files may contain many lines,
s% even some that have 'begin' in them.
( iΆ s t1( iΆ s t1( R R R
R R R t decodeR
R R R ( R
R R ( ( R t test_decode! s c C su t i d t } t i } y! t i | | | i d Wn. t i j
o } | i t | d n Xd S( Ns
begin 644 t1
s No exception throwns Truncated input file(
R R t encodedtextR R R R R
t failt Errort eR t str( R
R R R ( ( R t test_truncatedinput/ s c C sq t i d } t i } y! t i | | | i d Wn. t i j
o } | i
t | d n Xd S( Nt s No exception throwns' No valid begin line found in input file( R R R R R R R
R R R R R ( R
R R R ( ( R t test_missingbegin8 s ( t __name__t
__module__R R R R ( ( ( R R s
t UUStdIOTestc B s, t Z d Z d Z d Z d Z RS( Nc C s t i | _ t i | _ d S( N( t syst stdinR
t stdout( R
( ( R t setUpC s c C s | i t _ | i t _ d S( N( R
R R R ( R
( ( R t tearDownG s c C sX t i t t _ t i t _ t i d d d d | i t i i
t d d S( Nt -R iΆ ( iΆ s t1( R R R R R R R R R
R R R
( R
( ( R R K s
c C sR t i t d t _ t i t _ t i d d | i t i i
t d S( NiΆ R R"