def test_solid_bar_one(self): assert round_bar(13, 0) == { "Centroid": 6.5, "Area": 132.73228961416876, "Ixx": 1401.9848090496575, "Sxx": 215.68997062302424, }
def test_solid_bar_two(self): assert round_bar(8) == { "Centroid": 4.0, "Area": 50.26548245743669, "Ixx": 201.06192982974676, "Sxx": 50.26548245743669, }
def test_hollow_bar(self): assert round_bar(18, 15) == { "Centroid": 9.0, "Area": 77.75441817634739, "Ixx": 2667.9484736759196, "Sxx": 296.4387192973244, }
def test_negative_inside(self): with raises(ValueError): round_bar(5, -2)
def test_no_outside(self): with raises(ValueError): round_bar(-3)