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



By the way, I spent some time on `runcli.py` and I believe there are
some things we can remove there and opened an issue [1].

Might not be fully related but this can make some room to test
interactive interface, either with pexpect or with an ad-hoc solution.

Best regards,
Gokcen

[1] https://gitlab.com/BuildStream/buildstream/issues/729

Jonathan Maw via BuildStream-list <buildstream-list gnome org>, 23 Eki
2018 Sal, 13:15 tarihinde şunu yazdı:

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
_______________________________________________
BuildStream-list mailing list
BuildStream-list gnome org
https://mail.gnome.org/mailman/listinfo/buildstream-list


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