Commit b8ff93e
Wrap calls to deprecated functions in
Running `check/pytest` in Python 3.11 on a Debian Linux system produced
a few warnings similar to this:
```
cirq-core/cirq/experiments/qubit_characterizations_test.py::test_parallel_single_qubit_parallel_single_qubit_randomized_benchmarking
/usr/local/google/home/mhucka/projects/github/cirq-pr-warnings/cirq-core/cirq/experiments/qubit_characterizations_test.py:130: DeprecationWarning: parallel_single_qubit_randomized_benchmarking was used but is deprecated.
It will be removed in cirq v2.0.
please use parallel_single_qubit_rb instead
results = parallel_single_qubit_randomized_benchmarking(
```
These are not critical, but it is a little bit surprising to see them in
Cirq's own unit tests.
This wraps the relevant calls in `qubit_characterizations_test.py` with
the `cirq.testing.assert_deprecated(…)` context manager to indicate that
the deprecation messages are known and expected, and keep them from
bubbling up to developers.
---------
Co-authored-by: Pavol Juhas <juhas@google.com>qubit_characterizations_test.py (#8031)1 parent 603755a commit b8ff93e
1 file changed
Lines changed: 12 additions & 13 deletions
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
107 | 104 | | |
108 | 105 | | |
109 | 106 | | |
110 | | - | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | | - | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
| |||
0 commit comments