[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread Michael Foord
Michael Foord added the comment: Using the runner as a "context" passed to test cases (and accessible from tests) for this kind of configuration seems like a good approach to me. -- ___ Python tracker

[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread R. David Murray
R. David Murray added the comment: I like that approach as well, it is the kind of API I've been finding myself writing a fair bit lately (a context passed to class instances that otherwise don't store global state themselves). -- ___ Python

[issue22197] Allow better verbosity / output control in test cases

2015-08-20 Thread Robert Collins
Robert Collins added the comment: There's a few interacting things here. If I can suggest some design thoughts. buffering within a test is I think really something we should offer a test servicing API for. There are many thirdparty ones (e.g. I have one in fixtures) - but it should be a

[issue22197] Allow better verbosity / output control in test cases

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: -demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___ Python-bugs-list mailing

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is the verbose attribute of the test.support module. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: That only works for the CPython test suite (and it's not a public API). FWIW I'm +1 on the idea, but I would have to see how it will get implemented in a patch. -- stage: - needs patch ___ Python tracker

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Usages of test.support.verbose should be replaced by self.verbosity. As for output buffering, may be replace sys.stdout by file-like object which flushes its buffered content to original stdout on failure and discard it on success. Or add the self.log

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Ezio Melotti
Ezio Melotti added the comment: As for output buffering, may be replace sys.stdout by file-like object which flushes its buffered content to original stdout on failure and discard it on success. This is what the --buffer option is already supposed to do (I only found out about it thanks to

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, I'm sorry for suggesting two features in one issue :-) Feature #1 is self.verbosity (as a read-only variable) on test cases. Sounds like a no-brainer, IMHO :-) Feature #2 is selective enabling of the buffering feature in test cases. This rather

[issue22197] Allow better verbosity / output control in test cases

2014-09-26 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___ Python-bugs-list

[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord
Michael Foord added the comment: This seems like a reasonable improvement, I'd be in favour. I'd be *slightly* concerned that a test can override an explicit verbosity setting of the user, but I guess that annoyance is up to the test writer (they should check for an explicit setting first).

[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, I'm only proposing read-only access to the verbosity information. And forcing output buffering would only last for the current test method, of course. -- ___ Python tracker rep...@bugs.python.org

[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord
Michael Foord added the comment: Yep. I have no qualms about allowing test cases to switch on buffering. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___

[issue22197] Allow better verbosity / output control in test cases

2014-08-20 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___

[issue22197] Allow better verbosity / output control in test cases

2014-08-18 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___

[issue22197] Allow better verbosity / output control in test cases

2014-08-14 Thread Antoine Pitrou
New submission from Antoine Pitrou: Currently, test cases have no control over output and verbosity. I would propose two possible enhancements: - give the TestCase read access to the verbosity value (as e.g. `self.verbosity`), to allow for conditional output in tests - allow test methods to

[issue22197] Allow better verbosity / output control in test cases

2014-08-14 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22197 ___ ___ Python-bugs-list