def it_is_used_by_PhysPkgReader_when_pkg_is_a_stream(self): with open(zip_pkg_path, 'rb') as stream: phys_reader = PhysPkgReader(stream) assert isinstance(phys_reader, _ZipPkgReader)
def it_raises_when_pkg_path_is_not_a_package(self): with pytest.raises(PackageNotFoundError): PhysPkgReader('foobar')
def it_is_used_by_PhysPkgReader_when_pkg_is_a_zip(self): phys_reader = PhysPkgReader(zip_pkg_path) assert isinstance(phys_reader, _ZipPkgReader)
def it_is_used_by_PhysPkgReader_when_pkg_is_a_dir(self): phys_reader = PhysPkgReader(dir_pkg_path) assert isinstance(phys_reader, _DirPkgReader)