Пример #1
0
 def it_can_be_closed(self, ZipFile_):
     # mockery ----------------------
     zipf = ZipFile_.return_value
     zip_pkg_reader = _ZipPkgReader(None)
     # exercise ---------------------
     zip_pkg_reader.close()
     # verify -----------------------
     zipf.close.assert_called_once_with()
Пример #2
0
 def it_can_be_closed(self, ZipFile_):
     # mockery ----------------------
     zipf = ZipFile_.return_value
     zip_pkg_reader = _ZipPkgReader(None)
     # exercise ---------------------
     zip_pkg_reader.close()
     # verify -----------------------
     zipf.close.assert_called_once_with()
Пример #3
0
 def it_opens_pkg_file_zip_on_construction(self, ZipFile_, pkg_file_):
     _ZipPkgReader(pkg_file_)
     ZipFile_.assert_called_once_with(pkg_file_, 'r')
Пример #4
0
 def phys_reader(self, request):
     phys_reader = _ZipPkgReader(zip_pkg_path)
     request.addfinalizer(phys_reader.close)
     return phys_reader
Пример #5
0
 def it_opens_pkg_file_zip_on_construction(self, ZipFile_, pkg_file_):
     _ZipPkgReader(pkg_file_)
     ZipFile_.assert_called_once_with(pkg_file_, 'r')
Пример #6
0
 def phys_reader(self, request):
     phys_reader = _ZipPkgReader(zip_pkg_path)
     request.addfinalizer(phys_reader.close)
     return phys_reader