[svn r37264] create the new development trunk
--HG-- branch : trunk
This commit is contained in:
20
py/test/tkinter/testing/test_capture_out_err.py
Normal file
20
py/test/tkinter/testing/test_capture_out_err.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import py
|
||||
from py.__.test.tkinter import backend
|
||||
ReportBackend = backend.ReportBackend
|
||||
|
||||
datadir = py.magic.autopath().dirpath('data')
|
||||
|
||||
def test_capture_out_err():
|
||||
config = py.test.config._reparse([datadir/'filetest.py'])
|
||||
backend = ReportBackend()
|
||||
backend.start_tests(config = config,
|
||||
args = config.remaining,
|
||||
tests = [])
|
||||
while backend.running:
|
||||
backend.update()
|
||||
backend.update()
|
||||
store = backend.get_store()
|
||||
assert len(store.get(failed = True)) == 1
|
||||
failed = store.get(failed = True)[0]
|
||||
assert failed.stdout == 'STDOUT'
|
||||
assert failed.stderr == 'STDERR'
|
||||
Reference in New Issue
Block a user