Re: [BuildStream] How to catch regressions in buildstream's interactive interface



On 2018-10-22 18:28, Jonathan Maw via BuildStream-list wrote:
On 2018-10-20 14:08, Gökçen Nurlu wrote:
Hello all,

Maybe we can find a way to make use of  `input=` kwarg of click's own
`invoke()` method [0].
`tests.testutils.runcli.Cli.run()` [1] can possibly be extended to
accept such parameter and pass that to click object [2], somehow.

[0] - https://click.palletsprojects.com/en/7.x/testing/#input-streams
[1] -
https://gitlab.com/BuildStream/buildstream/blob/master/tests/testutils/runcli.py#L238
[2] -
https://gitlab.com/BuildStream/buildstream/blob/master/tests/testutils/runcli.py#L313

Additionally, I think extending test utils to introduce this kind of
tests might deserve a separate issue to track it more visibly. Do have
one already?

Best regards,
Gokcen


Hi Gokcen,

I'll have a look at it. The listed example won't fit my use-case (I
need to send input as a result of certain output), but I'll dig into
the documentation to see if it can support that.

Having looked into what click's testing API [1] can do, there does not appear to be any interface that'll help me to send lines to the input in response to specific output, so I'll have to make do with pexpect for now.

Thanks,

Jonathan

[1] https://click.palletsprojects.com/en/7.x/api/

--
Jonathan Maw, Software Engineer, Codethink Ltd.
Codethink privacy policy: https://www.codethink.co.uk/privacy.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]