Skip to content

Commit 9fb3ba1

Browse files
committed
No patch for shtos
1 parent cbf71d0 commit 9fb3ba1

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

tests/test_device.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,10 @@
3232
SOME_API_KEY = "ABC123"
3333

3434
test_config = """\
35-
[main]
36-
shots = 1000
37-
3835
[default.gaussian]
3936
hbar = 2
4037
4138
[aqt.sim]
42-
shots = 99
4339
api_key = "{}"
4440
""".format(
4541
SOME_API_KEY
@@ -467,12 +463,9 @@ def test_device_gets_local_config(self, monkeypatch, tmpdir):
467463
"pennylane.default_config", qml.Configuration("config.toml")
468464
) # force loading of config
469465

470-
with pytest.warns(
471-
qml.exceptions.PennyLaneDeprecationWarning, match="shots on device is deprecated"
472-
):
473-
dev = qml.device("aqt.sim", wires=2)
466+
dev = qml.device("aqt.sim", wires=2)
474467

475-
assert dev.shots.total_shots == 99
468+
assert dev.shots.total_shots is None # note that dev.shots is deprecated
476469
assert API_HEADER_KEY in dev.header.keys()
477470
assert dev.header[API_HEADER_KEY] == SOME_API_KEY
478471

@@ -493,10 +486,7 @@ def test_device_gets_api_key_default_config_directory(self, monkeypatch, tmpdir)
493486
c = qml.Configuration("config.toml")
494487
monkeypatch.setattr("pennylane.default_config", c) # force loading of config
495488

496-
with pytest.warns(
497-
qml.exceptions.PennyLaneDeprecationWarning, match="shots on device is deprecated"
498-
):
499-
dev = qml.device("aqt.sim", wires=2)
489+
dev = qml.device("aqt.sim", wires=2)
500490

501491
assert API_HEADER_KEY in dev.header.keys()
502492
assert dev.header[API_HEADER_KEY] == SOME_API_KEY
@@ -515,10 +505,7 @@ def test_device_gets_api_key_pennylane_conf_env_var(self, monkeypatch, tmpdir):
515505
"pennylane.default_config", qml.Configuration("config.toml")
516506
) # force loading of config
517507

518-
with pytest.warns(
519-
qml.exceptions.PennyLaneDeprecationWarning, match="shots on device is deprecated"
520-
):
521-
dev = qml.device("aqt.sim", wires=2)
508+
dev = qml.device("aqt.sim", wires=2)
522509

523510
assert API_HEADER_KEY in dev.header.keys()
524511
assert dev.header[API_HEADER_KEY] == SOME_API_KEY

0 commit comments

Comments
 (0)