--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
Well,
I do not program in dynamic language but if i will probably i would use something like interfaces to document my roles.
Mock roles, not objects. Remember?
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
Python is a favourite of mine.
Remember that much of the early TDD work was done in Smalltalk, also untyped but with excellent IDE support. One strong advantage is that there’s just fewer lines of code to consider.
You’ll need find your own way. Some of it you might be able to do with convention and a little documentation. Or you can define classes to use as interfaces (no leading ‘I’ please) as Python supports multiple inheritance. Or just keep your types small and pay attention. The most important thing is to be obsessively consistent.
There is an O’Reilly book on TDD with Python which I believe is decent (another member of my to-read stack).
S
> On 18 Jun 2015, at 13:56, Miguel Casal Guillán <d...@miguelcasal.net> wrote:
> Hi everybody!
>
> Lately I'm learning Python and I'm enjoying a lot of its readability and simplicity, besides its huge ecosystem of modules.
>
> As you already know, Python is a dynamic language that lacks some of the "classical" features of the OOP, interfaces between them. On the other hand, GOOS examples are in Java and they make extensive use of interfaces.
>
> How am I supposed to do TDD in Python? The obvious approach would be not to fight against the language's nature and rather than creating interfaces, define my objects' APIs directly into the tests. After all, no types are enforced during runtime or compilation to bytecode, and if some object implements the needed methods execution will be fine (duck typing).
>
> What's your opinion about that?
>
>
> Thank you.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.