From f170d21210d1d7b7b30b22a372149677fc339c73 Mon Sep 17 00:00:00 2001 From: Frank Harkins Date: Tue, 14 May 2024 20:37:03 +0100 Subject: [PATCH] Fix mocking code (#1372) Embarassingly, #1368 broke the mocking code as `warnings` was never imported. I didn't notice because `kernel.execute` doesn't report if the execution fails. I'm making a companion PR to catch this. --- scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py b/scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py index 76284e0e33e..ac5cc037ecd 100644 --- a/scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py +++ b/scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py @@ -40,6 +40,7 @@ # If not submitting jobs, we also run this code before notebook execution to mock the real backend MOCKING_CODE = """\ +import warnings from qiskit_ibm_runtime import QiskitRuntimeService from qiskit.providers.fake_provider import GenericBackendV2