Re: [Python-Dev] Questions on unittest behaviour

2006-08-18 Thread Jonathan Lange
On 8/19/06, Collin Winter <[EMAIL PROTECTED]> wrote: > 1) TestCase.tearDown() is only run if TestCase.setUp() succeeded. It > seems to me that tearDown() should always be run, regardless of any > failures in setUp() or the test method itself. > > The case I'm considering is something like this, ie,

Re: [Python-Dev] Path object design

2006-11-01 Thread Jonathan Lange
On 11/1/06, Georg Brandl <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On 03:14 am, [EMAIL PROTECTED] wrote: > > > > >One thing is sure -- we urgently need something better than os.path. > > >It functions well but it makes hard-to-read and unpythonic code. > > > > I'm not so sure. Th

Re: [Python-Dev] bool conversion wart?

2007-02-22 Thread Jonathan Lange
On 2/23/07, Neal Becker <[EMAIL PROTECTED]> wrote: > >>> bool ('False') > True > Non-empty strings are considered True, empty strings are considered False. This is not a wart, as the behaviour matches that of other sequences. cheers, jml ___ Python-Dev

Re: [Python-Dev] Unit Test Guide

2008-02-21 Thread Jonathan Lange
On Fri, Feb 22, 2008 at 2:43 AM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > On 21 Feb, 12:30, "Virgil Dupras" <[EMAIL PROTECTED]> wrote: > > Hi devs, > > > > > > Specifically, I'd like to know about files managements in tests. Is > > every test expected to clean after itself, or is there an

Re: [Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

2008-03-19 Thread Jonathan Lange
On Wed, Mar 19, 2008 at 6:24 PM, Gabriel Grant <[EMAIL PROTECTED]> wrote: > Hi all, > > This gem from unittest.py is pretty much the opposite of "one obvious way": > > # Synonyms for assertion methods > [snip] > > Could these be removed for 3k? > I agree with others who say that we shouldn't

Re: [Python-Dev] [Python-3000] Python source code on Bazaar vcs

2008-03-21 Thread Jonathan Lange
On Sat, Mar 22, 2008 at 8:28 AM, Paul Moore <[EMAIL PROTECTED]> wrote: > Basically, can some Bazaar expert offer a suggestion as to how a > non-developer with read-only access would best use the Bazaar > repositories to maintain a number of patches to be posted to the > tracker? > Here's what

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Jonathan Lange
On Fri, Apr 18, 2008 at 12:54 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I'm worried that a mass renaming would do anything but inconvenience > users during the already stressful 2->3 transition. > > I'm more in favor of the original proposal of reducing the redundancy > post-3.0. > > If

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Jonathan Lange
On Thu, Apr 17, 2008 at 11:49 PM, Michael Foord <[EMAIL PROTECTED]> wrote: > assert_raises_with_message(exc_class, message, callable, *args, > **keywargs) > I don't think this one should go in. I think it would be better if assertRaises just returned the exception object that it catches.

Re: [Python-Dev] Proposed unittest changes

2008-04-17 Thread Jonathan Lange
On Fri, Apr 18, 2008 at 8:34 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 17, 2008 at 3:31 PM, Jonathan Lange <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 17, 2008 at 11:49 PM, Michael Foord > > <[EMAIL PROTECTED]> wrote: > > >

Re: [Python-Dev] Disable tests in unittest (issue3202)

2008-06-25 Thread Jonathan Lange
On Thu, Jun 26, 2008 at 7:13 AM, Justin Mazzola Paluska <[EMAIL PROTECTED]> wrote: > Hi, > ... > The idea behind the patch is that it's sometimes useful to disable > tests without removing them from the TestCase. For example, a > co-worker and I have a module with a few tests that will fail for t

Re: [Python-Dev] Disable tests in unittest (issue3202)

2008-06-27 Thread Jonathan Lange
On Fri, Jun 27, 2008 at 4:57 AM, Justin Mazzola Paluska <[EMAIL PROTECTED]> wrote: > I wasn't aware of bzrlib's extentions to unittest — many of them, > including KnownFailure, TestSkipped, > bzrlib.test.ExtendedTestResult.expectFailure, and the sundry list of > bzrlib.test.TestCase.assert* look u

Re: [Python-Dev] Proposed unittest changes

2008-07-14 Thread Jonathan Lange
On Tue, Jul 15, 2008 at 9:43 AM, Michael Foord <[EMAIL PROTECTED]> wrote: > I personally find unittest pretty readable, the feature most lacking is > autodiscovery of tests which nose does seem to provide very well although I > haven't used it yet. FWIW, Twisted's 'trial' has done this since about

Re: [Python-Dev] PEP: Consolidating names and classes in the `unittest`module (updated 2008-07-15)

2008-07-14 Thread Jonathan Lange
On Tue, Jul 15, 2008 at 12:06 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> ``set_up(…)`` >> Replaces ``setUp(…)`` > > . . >> >> ``tear_down(…)`` >> Replaces ``tearDown(…)`` > > Am I the only one who finds this sort of excessive pep-8 underscoring to be > horrorific? > > Nobody I know spell

Re: [Python-Dev] assertRaises

2008-07-17 Thread Jonathan Lange
On Fri, Jul 18, 2008 at 8:51 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: >> >> Let's just make assertRaises return the exception instance, it seems >> >> like it feels the need correctly. >> > >> > and I meant "fills", not "feels", obviously... >> >> +1 : enriching the existing method in a way that