コード例 #1
0
def test_multiple_assignment():
    options = RcontribOptions()
    options.ab = 2
    options.ad = 546
    options.M = r'.\file with space'
    assert '-ab 2' in options.to_radiance()
    assert 'ad 546' in options.to_radiance()
    assert options.M == typing.normpath(r'.\file with space')
コード例 #2
0
def test_exclusives_m():
    opt = RcontribOptions()
    opt.m = 'modifier'
    with pytest.raises(exceptions.ExclusiveOptionsError):
        opt.M = './suns.mod'