Skip to content

Commit b333169

Browse files
author
Jim Havrilla
committed
added test for Tbx
1 parent 24df1bf commit b333169

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

hts/test/test_tbx.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
from hts import Tbx
3+
from nose.tools import assert_raises
4+
5+
HERE = os.path.dirname(__file__)
6+
GTF = os.path.join(HERE, "example.gtf.gz")
7+
BAM = os.path.join(HERE, "e.sam")
8+
9+
def test_build():
10+
if os.path.exists(GTF + ".tbi"):
11+
os.unlink(GTF + ".tbi")
12+
t = Tbx(GTF)
13+
assert t._tbx
14+
assert os.path.exists(GTF + ".tbi")
15+
16+
def test_error_on_bad_file():
17+
assert_raises(Exception, Tbx, BAM)
18+

0 commit comments

Comments
 (0)