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