示例#1
0
def test_check_BOM10():
    """ Component basis defined out of index bounds """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_10)
    assert str(
        err_info.value
    ) == 'component 1 component basis input not within range of index'
示例#2
0
def test_check_BOM8():
    """ Missing component basis input """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_8)
    assert str(
        err_info.value
    ) == 'component 1 component basis requires component basis input'
示例#3
0
def test_check_BOM13():
    """ material defined out of index bounds """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_13)
    assert str(err_info.value
               ) == 'component 1 material input not within range of index'
示例#4
0
def test_check_BOM12():
    """ material input not a integer """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_12)
    assert str(err_info.value) == 'component 1 material requires integer input'
示例#5
0
def test_check_BOM11():
    """ Missing component material input """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_11)
    assert str(
        err_info.value) == 'component 1 material requires material input'
示例#6
0
def test_check_BOM9():
    """ Component basis input not a integer """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_9)
    assert str(
        err_info.value) == 'component 1 component basis requires integer input'
示例#7
0
def test_check_BOM6():
    """ Missing Component Discription """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_6)
    assert str(err_info.value) == 'component 1 needs a discription.'
示例#8
0
def test_check_BOM7():
    """ Interger Component Discription """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_7)
    assert str(
        err_info.value) == 'component 1 description requires character input.'
示例#9
0
def test_check_BOM5():
    """ Interger Component Name """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_5)
    assert str(err_info.value) == 'component 1 name requires charater input.'
示例#10
0
def test_check_BOM4():
    """ Missing Component Name """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_4)
    assert str(err_info.value) == 'component 1 needs a name.'
示例#11
0
def test_check_BOM3():
    """ improper length BOM input """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_3)
    assert str(err_info.value) == 'component 1 entry is improperly formated.'
示例#12
0
def test_check_BOM2():
    """ Empty List Input """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_2)
    assert str(err_info.value) == 'component 1 entry is improperly formated.'
示例#13
0
def test_check_BOM1():
    """ Empty Input """
    with pytest.raises(AssertionError) as err_info:
        PyDampCheck.check_BOM(BOM_fail_1)
    assert str(err_info.value) == 'Input file requires BOM input'