Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Tests for the operating system file-like object implementation. N/A os N/A unittest dfvfs.file_io os_file_io dfvfs.lib errors dfvfs.path os_path_spec dfvfs.resolver context OSFileTest N/A N/A unittest TestCase N/A N/A The unit test for the operating systesm file-like object. setUp N/A N/A self N/A N/A N/A Sets up the needed objects used throughout the test. N/A N/A self _resolver_context N/A N/A context Context N/A test_file N/A N/A N/A os path join test_data password.txt N/A N/A self _path_spec1 N/A N/A os_path_spec OSPathSpec location test_file N/A test_file N/A N/A N/A os path join test_data another_file N/A N/A self _path_spec2 N/A N/A os_path_spec OSPathSpec location test_file N/A testOpenClosePathSpec N/A N/A self N/A N/A N/A Test the open and close functionality using a path specification. N/A file_object N/A N/A os_file_io OSFile N/A self _resolver_context N/A N/A N/A file_object open path_spec N/A self _path_spec1 N/A N/A N/A self assertEqual N/A N/A file_object get_size 116 N/A N/A N/A file_object close N/A N/A N/A self assertRaises ValueError N/A N/A N/A N/A file_object open path_spec None N/A test_file N/A N/A N/A os path join test_data password.txt N/A path_spec N/A N/A os_path_spec OSPathSpec location test_file N/A N/A path_spec location None N/A N/A N/A self assertRaises N/A errors PathSpecError N/A N/A N/A N/A file_object open path_spec path_spec N/A path_spec N/A N/A os_path_spec OSPathSpec location test_file N/A N/A path_spec parent N/A self _path_spec2 N/A N/A N/A self assertRaises N/A errors PathSpecError N/A N/A N/A N/A file_object open path_spec path_spec N/A testSeek N/A N/A self N/A N/A N/A Test the seek functionality. N/A file_object N/A N/A os_file_io OSFile N/A self _resolver_context N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object seek 0 N/A os SEEK_SET N/A N/A N/A file_object open path_spec N/A self _path_spec2 N/A N/A N/A self assertEqual N/A N/A file_object get_size 22 N/A N/A N/A file_object seek 10 N/A N/A N/A self assertEqual N/A N/A file_object read 5 other N/A N/A N/A self assertEqual N/A N/A file_object get_offset 15 N/A N/A N/A file_object seek -10 N/A os SEEK_END N/A N/A N/A self assertEqual N/A N/A file_object read 5 her f N/A N/A N/A file_object seek 2 N/A os SEEK_CUR N/A N/A N/A self assertEqual N/A N/A file_object read 2 e. N/A N/A N/A file_object seek 300 N/A os SEEK_SET N/A N/A N/A self assertEqual N/A N/A file_object get_offset 300 N/A N/A N/A self assertEqual N/A N/A file_object read 2 N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object seek -10 N/A os SEEK_SET N/A N/A N/A self assertEqual N/A N/A file_object get_offset 300 N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object seek 10 5 N/A N/A N/A self assertEqual N/A N/A file_object get_offset 300 N/A N/A N/A file_object close N/A testRead N/A N/A self N/A N/A N/A Test the read functionality. N/A file_object N/A N/A os_file_io OSFile N/A self _resolver_context N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object read N/A N/A N/A file_object open path_spec N/A self _path_spec1 N/A read_buffer N/A N/A file_object read N/A expected_buffer place,user,password
bank,joesmith,superrich
alarm system,-,1234
treasure chest,-,1111
uber secret laire,admin,admin
 N/A N/A N/A self assertEqual read_buffer expected_buffer N/A N/A N/A file_object close N/A testGetOffset N/A N/A self N/A N/A N/A Test the get offset functionality. N/A file_object N/A N/A os_file_io OSFile N/A self _resolver_context N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object get_offset N/A N/A N/A file_object open path_spec N/A self _path_spec1 N/A offset N/A N/A file_object get_offset N/A N/A N/A self assertEqual offset 0 N/A N/A N/A file_object close N/A testGetSize N/A N/A self N/A N/A N/A Test the get size functionality. N/A file_object N/A N/A os_file_io OSFile N/A self _resolver_context N/A N/A N/A self assertRaises IOError N/A N/A N/A N/A file_object get_size N/A N/A N/A file_object open path_spec N/A self _path_spec1 N/A size N/A N/A file_object get_size N/A N/A N/A self assertEqual size 116 N/A N/A N/A file_object close N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main