Update timeline.md

This commit is contained in:
Pavel Minaev 2022-05-01 14:15:14 -07:00 committed by Pavel Minaev
parent 7623694856
commit 729c02f866

View file

@ -73,7 +73,7 @@ the return value of `wait_until_realized()` is the first occurrence that realize
A *basic* expectation is described by the circumstances of the occurrence the expectation is to be realized (`expectation.circumstances`). Whereas the circumstances of an occurrence is a data object, the circumstances of the expectation is usually a *pattern*, as represented by a `Some` object from the `patterns` package. An expectation is realized by an occurrence if `occurrence.circumstances == expectation.circumstances` is true (for patterns, the overloaded `==` operator is used for matching rather than equality; see the docstrings for the `patterns` package for details). For example, given a basic expectation with these circumstances:
```py
('Event', ANY, some.dict.containing({'threadId': 1}))
('Event', some.thing, some.dict.containing({'threadId': 1}))
```
It can be realized by any of these occurrences:
```py
@ -191,7 +191,7 @@ assert (
When two expectations are conjuncted: `(A & B)` - the resulting expectation is realized at the occurrence at which `A` and `B` are both realized, regardless of their relative order. Thus:
```py
Event('stopped', ANY) & Event('continued', ANY)
Event('stopped', some.thing) & Event('continued', some.thing)
```
this expectation will be realized in timeline:
```py
@ -216,7 +216,7 @@ debug_session.wait_until_realized(Response(pause1) & Response(pause2))
When two expectations are disjuncted: `(A | B)` - the resulting expectation is realized at the first occurrence at which either `A` or `B` is realized, or both are realized. Thus, the expectation:
```py
Event('stopped', ANY) | Event('continued', ANY)
Event('stopped', some.thing) | Event('continued', some.thing)
```
will be realized in any of these timelines:
```py