Esempio n. 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)
Esempio n. 2
0
def test_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(require_failure=True)

    assert "Test failures were detected" == str(cm.value)
Esempio n. 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)
Esempio n. 4
0
def test_success():
    try:
        smoke()
    except SystemExit:
        pytest.fail("smoke test should have passed")
Esempio n. 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)
Esempio n. 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)
Esempio n. 7
0
def test_failure():
    with pytest.raises(SystemExit) as cm:
        smoke(require_failure=True)

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