def test_change(): assert change(1, 0) is None assert change(10, 5) == 1.00 # 100% increase assert change(50, 100) == -0.50 # 50% decrease assert change(None, 100) == -1.00 # 100% decrease assert change(50, None) is None
def test_change(): assert change(1, 0) is None assert change(10, 5) == 1.00 # 100% increase assert change(50, 100) == -0.50 # 50% decrease assert change(None, 100) == -1.00 # 100% decrease assert change(50, None) is None