[Tutor] Mocking with "mock" in unit testing
Dave Angel
davea at davea.name
Fri Jan 17 17:05:24 CET 2014
Steven D'Aprano <steve at pearwood.info> Wrote in message:
> On Fri, Jan 17, 2014 at 08:35:04AM -0500, eryksun wrote:
>> On Fri, Jan 17, 2014 at 6:23 AM, Steven D'Aprano <steve at pearwood.info> wrote:
>> > On Fri, Jan 17, 2014 at 09:58:06AM +0000, James Chapman wrote:
> [...]
>> >> import mockimport unittestimport pinger
>> >> class Test_Pinger(unittest.TestCase):
>> >
>> > And here you have two more SyntaxErrors: missing commas between
>> > arguments to import, and a stray space before the "class" again.
>>
>> This is also fine in the rich text version. BTW, the botched plain
>> text conversion is missing line breaks, not commas.
>
> I don't understand this. If I'm interpreting you correctly,
>
>
> import mockimport
> unittestimport
> pinger
>
>
> would not be "fine".
>
>
You're putting the linefeeds in the wrong places.
import mock
import
unittest
import
pinger
> --
> Steven
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
>
--
DaveA nr
More information about the Tutor
mailing list