-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEBUG: track sampler was just yielding one time. Now infinite.
- Loading branch information
1 parent
dcf7e7c
commit 68bce78
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from bigwig_loader.sampler.track_sampler import TrackSampler | ||
|
||
|
||
def test_track_samler(): | ||
sampler = TrackSampler(total_number_of_tracks=40, sample_size=10) | ||
samples = [] | ||
for i, sample in enumerate(sampler): | ||
samples.append(sample) | ||
assert len(sample) == 10 | ||
assert all([0 <= s < 40 for s in sample]) | ||
if i == 100: | ||
break | ||
assert len(samples) == 101 |