[py-svn] r48318 - in py/branch/reporter-merge/py/test: . testing
fijal at codespeak.net
fijal at codespeak.net
Mon Nov 5 16:47:34 CET 2007
Author: fijal
Date: Mon Nov 5 16:47:34 2007
New Revision: 48318
Modified:
py/branch/reporter-merge/py/test/executor.py
py/branch/reporter-merge/py/test/reporter.py
py/branch/reporter-merge/py/test/session.py
py/branch/reporter-merge/py/test/testing/test_session.py
Log:
Seems that --pdb don't need to imply -s and worked out of the box.
I've got no idea how to test it though :-/
Modified: py/branch/reporter-merge/py/test/executor.py
==============================================================================
--- py/branch/reporter-merge/py/test/executor.py (original)
+++ py/branch/reporter-merge/py/test/executor.py Mon Nov 5 16:47:34 2007
@@ -35,9 +35,11 @@
try:
self.run(capture)
outcome = SerializableOutcome()
+ outcome.stdout, outcome.stderr = self.item._getouterr()
except Skipped:
e = py.code.ExceptionInfo()
outcome = SerializableOutcome(skipped=e)
+ outcome.stdout, outcome.stderr = self.item._getouterr()
except (SystemExit, KeyboardInterrupt):
raise
except:
@@ -52,6 +54,7 @@
excinfo.traceback = excinfo.traceback.cut(
path=code.path, firstlineno=code.firstlineno)
outcome = SerializableOutcome(excinfo=excinfo, setupfailure=False)
+ outcome.stdout, outcome.stderr = self.item._getouterr()
if self.usepdb:
if self.reporter is not None:
self.reporter(repevent.ImmediateFailure(self.item,
@@ -60,8 +63,7 @@
py.__.test.custompdb.post_mortem(excinfo._excinfo[2])
# XXX hmm, we probably will not like to continue from that
# point
- #raise SystemExit()
- outcome.stdout, outcome.stderr = self.item._getouterr()
+ raise SystemExit()
return outcome
class ApigenExecutor(RunExecutor):
Modified: py/branch/reporter-merge/py/test/reporter.py
==============================================================================
--- py/branch/reporter-merge/py/test/reporter.py (original)
+++ py/branch/reporter-merge/py/test/reporter.py Mon Nov 5 16:47:34 2007
@@ -143,6 +143,7 @@
self.timersync = item.time
def report_ImmediateFailure(self, event):
+ self.out.line()
self.repr_failure(event.item, event.outcome)
def report_TestFinished(self, item):
Modified: py/branch/reporter-merge/py/test/session.py
==============================================================================
--- py/branch/reporter-merge/py/test/session.py (original)
+++ py/branch/reporter-merge/py/test/session.py Mon Nov 5 16:47:34 2007
@@ -61,10 +61,6 @@
option.startserver = True
if self.config.getvalue("dist_boxed") and option.dist:
option.boxed = True
- # implied options
- if option.usepdb:
- if not option.nocapture:
- option.nocapture = True
# conflicting options
if option.looponfailing and option.usepdb:
raise ValueError, "--looponfailing together with --pdb not supported."
Modified: py/branch/reporter-merge/py/test/testing/test_session.py
==============================================================================
--- py/branch/reporter-merge/py/test/testing/test_session.py (original)
+++ py/branch/reporter-merge/py/test/testing/test_session.py Mon Nov 5 16:47:34 2007
@@ -6,7 +6,6 @@
FailedTryiter
implied_options = {
- '--pdb': 'usepdb and nocapture',
'-v': 'verbose',
'-l': 'showlocals',
#'--runbrowser': 'startserver and runbrowser', XXX starts browser
More information about the pytest-commit
mailing list