mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
35 lines
883 B
Python
35 lines
883 B
Python
import pytest
|
|
import windows
|
|
|
|
from pfwtest import *
|
|
|
|
@check_for_gc_garbage
|
|
class TestSystemWithCheckGarbage(object):
|
|
def test_version(self):
|
|
return windows.system.version
|
|
|
|
def test_version_name(self):
|
|
return windows.system.version_name
|
|
|
|
def test_computer_name(self):
|
|
return windows.system.computer_name
|
|
|
|
def test_services(self):
|
|
return windows.system.services
|
|
|
|
def test_logicaldrives(self):
|
|
return windows.system.logicaldrives
|
|
|
|
def test_wmi(self):
|
|
return windows.system.wmi.select("Win32_Process", "*")
|
|
|
|
|
|
@check_for_gc_garbage
|
|
@check_for_handle_leak
|
|
class TestSystemWithCheckGarbageAndHandleLeak(object):
|
|
def test_threads(self):
|
|
return windows.system.threads
|
|
|
|
def test_processes(self):
|
|
procs = windows.system.processes
|
|
assert windows.current_process.pid in [p.pid for p in procs] |