Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe071f52 authored by Zach Johnson's avatar Zach Johnson
Browse files

add beginings of behavior.py, a fluent behavior composer

Has getting the right cert behavior ever left you frustrated?
Is it too hard to know what a test is exactly doing? Does creating
the right responses ever feel like a game of telephone?

Introducing behavior.py - now you can write tests more naturally
and get context locally in the test on what will happen, instead of
opaque behavior in CertXYZ.

Now basically, the only new principal involved is that instead of
power being generated by the relative motion of conductors and fluxes
it’s produced by the modial interaction of magneto-reluctance and
capacitive diractance. The original behaviors had a base plate of
prefabulated amulite, surmounted by a malleable logarithmic casing
in such a way that the two spurving bearings were in a direct
line with the panametric fan.

behavior.py has now reached a high level of development, and it’s
being successfully used in the operation of milford trenions. It’s
available soon; wherever Rockwell Automation products are sold.

e.g.

self.cert_l2cap.reply_with_unacceptable_parameters()
(when is it going to?, is it always going to? can I make
it do it 2 times and then reply with something else?)

now becomes

when(self.cert_l2cap).config_request(anything())
    .then().reply_with_unacceptable_parameters()

yes, it's longer, but now the exact behavior is clear.

or you could imagine something like:

when(self.cert_l2cap).config_request(L2capMatchers.ConfigRequest(mode=BASIC))
    .then().reply_with_ertm()

Test: cert/run --host
Change-Id: I81133db3174446c0b9380da795dbb0e9f9bcf2a3
parent 99c567d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment