Skip to content

Commit 7d1c184

Browse files
committed
Fix expected error code and ensure COM is initialised for tests
1 parent 0db52d5 commit 7d1c184

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
if k[:1] not in ("", "_"):
1818
setattr(_native, k, getattr(_native_test, k))
1919

20+
_native.coinitialize()
21+
2022

2123
# Importing in order carefully to ensure the variables we override are handled
2224
# correctly by submodules.

tests/test_shortcut.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
def test_simple_shortcut(tmp_path):
99
open(tmp_path / "target.txt", "wb").close()
10-
_native.coinitialize()
1110
_native.shortcut_create(
1211
tmp_path / "test.lnk",
1312
tmp_path / "target.txt",
@@ -17,7 +16,6 @@ def test_simple_shortcut(tmp_path):
1716

1817

1918
def test_start_path():
20-
_native.coinitialize()
2119
p = Path(_native.shortcut_get_start_programs())
2220
assert p.is_dir()
2321

tests/test_urlutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def inject_error():
227227
def test_bits_errors(localserver, tmp_path, inject_error):
228228
import uuid
229229

230-
ERROR_MR_MID_NOT_FOUND = 0x8007013D
230+
ERROR_MR_MID_NOT_FOUND = 0x13D
231231

232232
dest = tmp_path / "read.txt"
233233
url = localserver + "/128kb"

0 commit comments

Comments
 (0)