[IPython-dev] Interactive input block handling

Evan Patterson epatters@enthought....
Wed Jul 21 10:10:31 CDT 2010


Done. That was very easy and it works well. Thanks, Fernando.

Evan

On Wed, Jul 21, 2010 at 9:55 AM, Evan Patterson <epatters@enthought.com>wrote:

> Great! I've merged your 'blockbreaker' branch into my 'qtfrontend' branch
> and will integrate BlockBreaker today.
>
> Evan
>
>
> On Wed, Jul 21, 2010 at 5:32 AM, Fernando Perez <fperez.net@gmail.com>wrote:
>
>> Hi folks,
>>
>> here:
>>
>>
>> http://github.com/fperez/ipython/commit/37182fcaaa893488c4655cd37049bb71b1f9152a
>>
>> is the code that Evan can start using now (and so can Omar as we
>> refactor the terminal code) for properly handling incremental
>> interactive input.  I ran out of time to add the block-splitting
>> capabilities for Gerardo, but that should be easy tomorrow.
>>
>> It would be a good habit to get into for all new code, to attempt as
>> best as possible 100% test coverage:
>>
>> (blockbreaker)amirbar[core]> nosetests -vvs --with-coverage
>> --cover-package=IPython.core.blockbreaker blockbreaker.py
>> test_dedent (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_indent (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_indent2 (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_interactive_block_ready
>> (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_interactive_block_ready2
>> (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_interactive_block_ready3
>> (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_interactive_block_ready4
>> (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_push (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_push2 (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> Test input with leading whitespace ... ok
>> test_reset (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> test_source (IPython.core.blockbreaker.BlockBreakerTestCase) ... ok
>> IPython.core.blockbreaker.test_spaces ... ok
>> IPython.core.blockbreaker.test_remove_comments ... ok
>> IPython.core.blockbreaker.test_get_input_encoding ... ok
>>
>> Name                        Stmts   Exec  Cover   Missing
>> ---------------------------------------------------------
>> IPython.core.blockbreaker     171    171   100%
>> ----------------------------------------------------------------------
>> Ran 15 tests in 0.022s
>>
>> OK
>>
>>
>> ###
>>
>> In this case it actually helped me a lot, because in going from ~85%
>> to 100% I actually found that the untested codepaths were indeed
>> buggy.  As the saying goes, 'untested code is broken code'...
>>
>> Cheers,
>>
>> f
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20100721/445c6582/attachment.html 


More information about the IPython-dev mailing list