示例#1
0
def test_get_maximum_displacement_none(mocker):
    
    # Mock the variables class
    variables = mocker.Mock()
    variables.maxdisp = None
    
    test = Loads(variables)
    result = test._get_maximum_displacement()
    
    assert np.isclose(result, [1000.0, 1000.0, 1000.0]).all()
示例#2
0
def test_get_maximum_displacement(mocker):
    
    # Mock the variables class
    variables = mocker.Mock()
    variables.maxdisp = [0, 0, 0]
    variables.sysdraft = 10.
    
    test = Loads(variables)
    result = test._get_maximum_displacement()
    
    assert np.isclose(result, [0, 0, 0]).all()