that maybe the example is wrong? also, in the command class definition i had to b'success' for the response key name but had to regular 'success' for the key when actually constructing the dict. (py3.6)
runciter: in case you wanted to take a quick glance first
runciter
ah ha
altendky: it seems very wrong to return a dictionary with native string keys from a responder
tried porting this to python once and failed cause I was too junior :) kinda wanna try again but now nobody actually uses dnode so..!
altendky
runciter: good fun. so that covers the second issue, yeah? but the first where the example responder returns a single value rather than a dict? `return self.uidCounter` http://twistedmatrix.com/documents/current/core...
runciter
that just seems like a bug in the docs
altendky: not sure yet though!
kolko joined the channel
altendky: probably good to file both as tickets
altendky: if you can stomach that :)
altendky
runciter: perhaps. i'm a little annoyed right now because i've been digging into several open source submissions recently... i mean really, pipenv can't handle installing from github properly? but anyways, not an appropriate feeling to have even if i do have it.
i keep thinking i'm close with my own code just to hit another road block
runciter
altendky: i dunno if i agree that it's not appropriate
altendky: whatever it is, it's a defining part of the open source experience
runciter: i can go months without needing to fix anything. then i've got six projects to try to fix...
runciter
altendky: you just need to work on more or different projects! then it can become daily
altendky: suffice it to say i sympathize :)
i'll file the issues
thanks for finding them!
notoriousno has quit
iffy has quit
iffy joined the channel
iffy has quit
dude-x_ joined the channel
dude-x_ has quit
altendky
runciter: that's kind of you. thanks
oberstet has quit
iffy joined the channel
iffy has left the channel
iffy1 joined the channel
iffy1 has left the channel
help_seeker joined the channel
dude-x_ joined the channel
help_seeker
Hello. I have a question on testing code which calls task.Cooperator.coiterate method. In my test I implemented TestScheduler which uses task.Clock.callLater instead of reactors one.
I submit 3 jobs and advance clock by one _EPSILON. When I run under debugger only one job gets processed. But when I just run my test all three jobs get processed.
help_seeker: ok, so a cooperator's execution is controlled by two things: a scheduler and a termination predicate
help_seeker: the scheduler makes sure that the cooperator regularly schedules its tasks, while the termination predicate determines how long *all* its tasks have to run
in other words, suppose you want to iterate over X, Y, and Z; the scheduler makes sure that X, Y, and Z have an opportunity to advance every EPSILON seconds. the termination predicate makes sure that X, Y, and Z are advanced until a certain amount of time has passed
_TestTerminatorPredicateFactory allows each iterator to be advanced exactly once each the Cooperator schedules its tasks
itamar joined the channel
help_seeker
runciter: Thank you!!!
runciter
help_seeker: sure thing - does that make sense?
help_seeker
Yes, perfect explanation!
runciter
i'll note that i don't think testing this is very valuable
can you explain why you're testing this?
clokep joined the channel
help_seeker
These are my "learning" tests. Just to make sure I understand how things are working.
runciter
help_seeker: that's a good reason for writing them, then :)
help_seeker
<runciter>: I tried to advance clock from inside job call: "job = Mock(side_effect=task.clock)". I expected to achieve the desired result (only one job processed), but it did not help.