def test_read_bitset(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 9' (fid, bitset) = makebits.read_bitset(line, 100) expected = intbitset([1, 2, 3, 4, 6, 10, 11, 12, 15]) assert fid == '3frb_TOP_frag24' assert bitset == expected
def test_read_bitset(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 9' (fid, bitset) = makebits.read_bitset(line, 100) expected = intbitset([1, 2, 3, 4, 6, 10, 11, 12, 15]) eq_(fid, '3frb_TOP_frag24') eq_(bitset, expected)
def test_read_bitset(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 9' (fid, bitset) = makebits.read_bitset(line, 100) expected = BitMap([1, 2, 3, 4, 6, 10, 11, 12, 15]) assert fid == '3frb_TOP_frag24' assert bitset == expected
def test_read_bitset_toolong(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 5' with pytest.raises(Exception) as e: makebits.read_bitset(line, 100) expected = ('On bit checksum incorrect for 3frb_TOP_frag24',) assert e.value.args == expected
def test_read_bitset_toolong(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 5' with assert_raises(Exception) as e: makebits.read_bitset(line, 100) expected = ('On bit checksum incorrect for 3frb_TOP_frag24',) eq_(e.exception.args, expected)
def test_read_bitset_toolong(): line = '3frb_TOP_frag24 1 2 3 4 6 10 11 12 15 0 5' with pytest.raises(Exception) as e: makebits.read_bitset(line, 100) expected = ('On bit checksum incorrect for 3frb_TOP_frag24', ) assert e.value.args == expected