Skip to content

Commit 46cd904

Browse files
committed
Add test: patching_managment
1 parent cc7211a commit 46cd904

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

applications/cybersecurity/patching_management/patching_managment.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@
748748
"source": [
749749
"from classiq import execute\n",
750750
"\n",
751-
"res = execute(qprog).result()"
751+
"result = execute(qprog).result_value()"
752752
]
753753
},
754754
{
@@ -793,7 +793,7 @@
793793
"source": [
794794
"from classiq.execution import VQESolverResult\n",
795795
"\n",
796-
"vqe_result = VQESolverResult.parse_obj(res[0].value)\n",
796+
"vqe_result = VQESolverResult.parse_obj(result)\n",
797797
"vqe_result.convergence_graph"
798798
]
799799
},
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from tests.utils_for_testbook import (
2+
validate_quantum_program_size,
3+
validate_quantum_model,
4+
wrap_testbook,
5+
)
6+
from testbook.client import TestbookNotebookClient
7+
8+
9+
@wrap_testbook("patching_managment", timeout_seconds=36)
10+
def test_notebook(tb: TestbookNotebookClient) -> None:
11+
# test models
12+
validate_quantum_model(tb.ref("qmod"))
13+
# test quantum programs
14+
validate_quantum_program_size(
15+
tb.ref("qprog"),
16+
expected_width=10, # actual width: 8
17+
expected_depth=30, # actual depth: 26
18+
)
19+
20+
# test notebook content
21+
pass # Todo

0 commit comments

Comments
 (0)