Exemplo n.º 1
0
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
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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
Exemplo n.º 4
0
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
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
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