[Twisted-Python] Testing AMP-based code
MichaelMayorov
marchael at ya.ru
Tue Jul 16 13:13:53 MDT 2013
<exarkun <at> twistedmatrix.com> writes:
> I think this is thinking in the right direction. Twisted generally
> tries to be responsible for testing its own code, and the serialization
> from commands to bytes (and the reverse) that AMP does is part of
> Twisted, so you should really be free from the burden of testing that
> that stuff works.
>
> ....
>
> Some pieces are probably still missing from the public API - for
> example, you do want to test that your objects all get properly
> serialized and deserialized through AMP, particularly if you're
> implementing custom Argument types. There are some private APIs,
> _objectsToStrings and _stringsToObjects mostly, that really help with
> testing this, and we should think about how to expose this functionality
> publically. Also, we should document this whole pile of stuff. Maybe
> you'd be interested in writing something up after you've had a chance to
> play with these ideas?
>
> Jean-Paul
>
Greetings!
Perhaps I should create a new thread, but I think that my problem could be
related with this question.
I want to implement master/slave protocol based on AMP, here is a slave side
code https://github.com/MichaelMayorov/buildbot/compare/fake-master-slave-
amp
The problem is that I want to pass few arguments to Bot
https://github.com/MichaelMayorov/buildbot/compare/fake-master-slave-
amp#L0R38 from this place
https://github.com/MichaelMayorov/buildbot/compare/fake-master-slave-
amp#L0R124
but current implementation not allow me to do this. I've read twisted API
docs and discussed my idea on #buildbot where finally take advice to post my
question here.
Thanks!
More information about the Twisted-Python
mailing list