def test_hts_append():
lab_path = join(DATA_DIR, "BASIC5000_0001.lab")
test_labels = hts.load(lab_path)
print("\n{}".format(test_labels))
# should get same string representation
labels = hts.HTSLabelFile()
assert str(labels) == ""
for label in test_labels:
labels.append(label)
assert str(test_labels) == str(labels)
@raises(ValueError)
def test_invalid_start_time():
l = hts.HTSLabelFile()
l.append((100000, 0, "NG"))
def test_succeeding_times():
l = hts.HTSLabelFile()
l.append((0, 1000000, "OK"))
l.append((1000000, 2000000, "OK"))
@raises(ValueError)
def test_non_succeeding_times():
l = hts.HTSLabelFile()
l.append((0, 1000000, "OK"))
l.append((1500000, 2000000, "NG"))
test_invalid_start_time()
test_succeeding_times()
test_non_succeeding_times()
# shouldn't raise RuntimeError
评论列表
文章目录