Skip to content

Commit 3de8200

Browse files
committed
Fix or improv test resilience
1 parent 92863f7 commit 3de8200

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_symbol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_symbols_module_info(symctx):
2929
def test_symbols_search(symctx):
3030
mod = symctx.load_file(path=u"c:\\windows\\system32\\ntdll.dll", addr=0x42000)
3131
res = symctx.search(u"ntdll!*CreateFile")
32-
assert set(s.name for s in res) == {"NtCreateFile", "ZwCreateFile"}
32+
assert set(s.name for s in res) >= {"NtCreateFile", "ZwCreateFile"} # May have other names
3333

3434

3535
def test_symbols(symctx):

tests/test_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_token_user(curtok):
3636
user_sid = curtok.user
3737
assert user_sid
3838
computername, username = windows.utils.lookup_sid(user_sid)
39-
assert computername == windows.system.computer_name
39+
assert computername.upper() == windows.system.computer_name.upper()
4040
assert username == os.environ["USERNAME"]
4141

4242
def test_token_id(curtok):

tests/test_wmi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_get_object(name, cls):
7575
# Todo: test
7676
# - put_instance
7777

78-
@pytest.mark.parametrize("cmdline", [r"c:\windows\notepad.exe trolol.exe"])
78+
@pytest.mark.parametrize("cmdline", [r"winver.exe test_string_pfw"])
7979
def test_exec_method_Win32_Process_create(cmdline):
8080
namespace = windows.system.wmi["root\\cimv2"]
8181
win32_process_cls = namespace.get_object("Win32_Process")

0 commit comments

Comments
 (0)