Working on rewriting of tests with pytest

This commit is contained in:
Clement Rouault
2017-09-06 18:42:54 +02:00
parent fccd2a49e6
commit 89e486cd95
14 changed files with 1690 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
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]