Skip to content

Commit

Permalink
Add test for fetch_summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Apr 14, 2024
1 parent 195d66a commit e011cc4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tests/test_bbi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import os.path as op
import numpy as np

Expand Down Expand Up @@ -51,6 +49,12 @@ def test_sigs():
assert f.is_remote


def test_aws_403_redirect():
# See https://stat.ethz.ch/pipermail/bioc-devel/2016-May/009241.html
url = 'https://www.encodeproject.org/files/ENCFF620UMO/@@download/ENCFF620UMO.bigWig'
bbi.open(url).fetch('chr21', 0, 1000)


@pytest.mark.parametrize('uri', bbi_paths_and_urls)
def test_chromsizes(uri):
with bbi.open(uri) as f:
Expand Down Expand Up @@ -184,7 +188,8 @@ def test_stackup(path):
assert x.shape == (2, 10)


def test_aws_403_redirect():
# See https://stat.ethz.ch/pipermail/bioc-devel/2016-May/009241.html
url = 'https://www.encodeproject.org/files/ENCFF620UMO/@@download/ENCFF620UMO.bigWig'
bbi.open(url).fetch('chr21', 0, 1000)
@pytest.mark.parametrize('path', bbi_paths)
def test_fetch_zoom_records(path):
with bbi.open(path) as f:
df = f.fetch_summaries('chr21', 0, 10000000)
assert len(df) > 0

0 comments on commit e011cc4

Please sign in to comment.