def test_DmrTwoSinglets_pa(): sim = DnmrTwoSinglets(165, 135, 1.5, 0.5, 0.5, 0.5) sim.pa = 0.75 assert sim.pa == 0.75 with pytest.raises(ValueError): sim.pa = -0.00000000001 with pytest.raises(ValueError): sim.pa = 1.00000000001
def test_DnmrTwoSinglets_properties(): sim = DnmrTwoSinglets(1, 2, 3, 4, 5, 0.6, (7, 8)) sim.va = 165.0 sim.vb = 135.0 sim.k = 1.5 sim.wa = 0.5 sim.wb = 0.5 sim.pa = 0.5 sim.limits = (85.0, 215.0) sim_args = (sim.va, sim.vb, sim.k, sim.wa, sim.wb, sim.pa, sim.limits) print('result: ', sim_args) assert sim_args == (165.0, 135.0, 1.5, 0.5, 0.5, 0.5, (85.0, 215.0))