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()
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()