mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fix or improv test resilience
This commit is contained in:
@@ -29,7 +29,7 @@ def test_symbols_module_info(symctx):
|
||||
def test_symbols_search(symctx):
|
||||
mod = symctx.load_file(path=u"c:\\windows\\system32\\ntdll.dll", addr=0x42000)
|
||||
res = symctx.search(u"ntdll!*CreateFile")
|
||||
assert set(s.name for s in res) == {"NtCreateFile", "ZwCreateFile"}
|
||||
assert set(s.name for s in res) >= {"NtCreateFile", "ZwCreateFile"} # May have other names
|
||||
|
||||
|
||||
def test_symbols(symctx):
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ def test_token_user(curtok):
|
||||
user_sid = curtok.user
|
||||
assert user_sid
|
||||
computername, username = windows.utils.lookup_sid(user_sid)
|
||||
assert computername == windows.system.computer_name
|
||||
assert computername.upper() == windows.system.computer_name.upper()
|
||||
assert username == os.environ["USERNAME"]
|
||||
|
||||
def test_token_id(curtok):
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ def test_get_object(name, cls):
|
||||
# Todo: test
|
||||
# - put_instance
|
||||
|
||||
@pytest.mark.parametrize("cmdline", [r"c:\windows\notepad.exe trolol.exe"])
|
||||
@pytest.mark.parametrize("cmdline", [r"winver.exe test_string_pfw"])
|
||||
def test_exec_method_Win32_Process_create(cmdline):
|
||||
namespace = windows.system.wmi["root\\cimv2"]
|
||||
win32_process_cls = namespace.get_object("Win32_Process")
|
||||
|
||||
Reference in New Issue
Block a user