Skip callback demo test if matplotlib is not installed (#7520)

This commit is contained in:
Xiaochang Wu 2021-12-19 08:20:38 +08:00 committed by GitHub
parent 58a6723eb1
commit 59bd1ab17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,6 +115,7 @@ def test_aft_demo():
os.remove('aft_model.json') os.remove('aft_model.json')
@pytest.mark.skipif(**tm.no_matplotlib())
def test_callbacks_demo(): def test_callbacks_demo():
script = os.path.join(PYTHON_DEMO_DIR, 'callbacks.py') script = os.path.join(PYTHON_DEMO_DIR, 'callbacks.py')
cmd = ['python', script, '--plot=0'] cmd = ['python', script, '--plot=0']