Пример #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
Пример #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)
Пример #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
Пример #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
Пример #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)
Пример #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