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

    assert "Test failures were detected" == str(cm.value)
Ejemplo 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)
Ejemplo n.º 4
0
def test_success():
    try:
        smoke()
    except SystemExit:
        pytest.fail("smoke test should have passed")
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 8
0
def test_success():
    try:
        smoke()
    except SystemExit:
        pytest.fail("smoke test should have passed")