Your IP : 216.73.216.213
�
��\c @ s d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m
Z
e j d k Z d e j
e
f d � � YZ d e f d
� � YZ d e f d � � YZ d
e f d � � YZ d e f d � � YZ e d k re j � n d S( s� Tests for `fake_filesystem_shutil` if used in
`fake_filesystem_unittest.TestCase`.
Note that almost all of the functionality is delegated to the real `shutil`
and works correctly with the fake filesystem because of the faked `os` module.
i����N( t fake_filesystem_unittest( t is_root( t RealFsTestMixint win32t RealFsTestCasec B s5 e Z d d � Z d � Z d � Z e d � � Z RS( t runTestc C s$ t j j | | � t j | � d S( N( R t TestCaset __init__R ( t selft
methodName( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyR ! s c C sj t j � | _ | j � sf | j � | j | _ t | _ t | _ | j � | j j d | j
� n d S( Ni� ( t ost getcwdt cwdt use_real_fst
setUpPyfakefst fst
filesystemt opent create_basepatht set_disk_usaget base_path( R ( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyt setUp% s
c C sX | j � rT | j j t j j | j � � t j | j d t �t j | j � n d S( Nt
ignore_errors(
R
R
t chdirt patht dirnameR t shutilt rmtreet TrueR ( R ( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyt tearDown/ s c C s# | j � r t j d k S| j j S( NR ( R
t syst platformR t
is_windows_fs( R ( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyR 5 s
( t __name__t
__module__R R R t propertyR ( ( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyR s
t FakeShutilModuleTestc B s* e Z d � Z d � Z e j e d � d � � Z e j e d � d � � Z e j e d � d � � Z e j e d � d � � Z
d � Z d � Z d
� Z
d � Z d � Z d
� Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e j e j d k d � d � � Z d � Z RS( c C s� | j d � } t j j | d � } | j | � t j j | d � } | j | � | j t j j | � � t j | � | j
t j j | � � | j
t j j | � � | j
t j j | � � d S( Nt xyzzyt subdirt subfile( t make_pathR
R t joint
create_dirt create_filet
assertTruet existsR R t assertFalse( R t directoryt dir_patht file_path( ( s[ /opt/alt/python27/lib/python2.7/site-packages/pyfakefs/tests/fake_filesystem_shutil_test.pyt test_rmtree= s
c C s� | j d � } t j j | d � } | j | � t j j | d � } | j | � t j | d � | j t j j | � � | j t j j | � � | j t j j | � � d S( NR% R&