Skip to content

Commit aebd99a

Browse files
committed
Fix remaining tests
For some reason the pytest vscode integration has stopped discovering tests, so I didn't know some were failing until GH actions ran them. Oops.
1 parent aa14b81 commit aebd99a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,15 @@ def test_returns_most_recent_window(self, snapshots: list[Snapshot]):
274274

275275
window = snapshot.history[-1].windows[0]
276276
other_window = snapshot.history[0].windows[0]
277-
lkp = snapshot.last_known_process_instance(window.executable)
277+
lkp = snapshot.last_known_process_instance(window)
278278

279279
assert lkp is window
280280
assert lkp is not other_window
281281

282282
def test_returns_none_if_window_not_found(self, snapshots: list[Snapshot]):
283-
assert snapshots[0].last_known_process_instance('does not exist') is None
283+
window = deepcopy(snapshots[0].history[0].windows[0])
284+
window.executable = 'does-not-exist.exe'
285+
assert snapshots[0].last_known_process_instance(window) is None
284286

285287
class TestMatchTitleKwarg:
286288
@pytest.fixture

0 commit comments

Comments
 (0)