示例#1
0
def test_xspec_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(xspec=True)

    assert "ERROR: Requested xspec as xspec but module not found" == str(
        cm.value)
示例#2
0
def test_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(require_failure=True)

    assert "Test failures were detected" == str(cm.value)
示例#3
0
def test_fits_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(fits="astropy")

    assert "ERROR: Requested astropy as fits but module not found" == str(
        cm.value)
示例#4
0
def test_success():
    try:
        smoke()
    except SystemExit:
        pytest.fail("smoke test should have passed")
示例#5
0
def test_xspec_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(xspec=True)

    assert "ERROR: Requested xspec as xspec but module not found" in str(cm.value)
示例#6
0
def test_fits_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(fits="astropy")

    assert "ERROR: Requested astropy as fits but module not found" in str(cm.value)
示例#7
0
def test_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(require_failure=True)

    assert "Test failures were detected" in str(cm.value)
示例#8
0
def test_success():
    try:
        smoke()
    except SystemExit:
        pytest.fail("smoke test should have passed")