def test_load_one_succeed(track_abundance): e1 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig1 = SourmashSignature(e1) x = save_signatures([sig1]) y = load_one_signature(x) assert sig1 == y
def test_load_one_succeed(track_abundance): e1 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig1 = SourmashSignature(e1) x = save_signatures([sig1]) y = load_one_signature(x) assert sig1 == y
def test_load_one_fail_multisig(track_abundance): e1 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig1 = SourmashSignature(e1) e2 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig2 = SourmashSignature(e2) x = save_signatures([sig1, sig2]) with pytest.raises(ValueError): y = load_one_signature(x)
def test_load_compressed(track_abundance): e1 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig1 = SourmashSignature(e1) x = save_signatures([sig1], compression=5) y = load_one_signature(x) assert sig1 == y sigfile = utils.get_test_data('genome-s10+s11.sig.gz') sigs = load_signatures(sigfile)
def test_load_one_fail_multisig(track_abundance): e1 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig1 = SourmashSignature(e1) e2 = sourmash.MinHash(n=1, ksize=20, track_abundance=track_abundance) sig2 = SourmashSignature(e2) x = save_signatures([sig1, sig2]) with pytest.raises(ValueError): y = load_one_signature(x)
def test_load_one_fail_nosig(track_abundance): x = save_signatures([]) print((x, )) with pytest.raises(ValueError): y = load_one_signature(x)
def test_load_one_fail_nosig(track_abundance): x = save_signatures([]) print((x,)) with pytest.raises(ValueError): y = load_one_signature(x)