Developers can specify placeholders for yet unknown attributes.
(tplaybook, typed)
| 75 | |
| 76 | @pytest.mark.parametrize("typed", [True, False]) |
| 77 | def test_placeholder(tplaybook, typed): |
| 78 | """Developers can specify placeholders for yet unknown attributes.""" |
| 79 | if typed: |
| 80 | f = tutils.Placeholder(int) |
| 81 | else: |
| 82 | f = tutils.Placeholder() |
| 83 | tplaybook >> TEvent([42]) |
| 84 | tplaybook << TCommand(f) |
| 85 | assert tplaybook |
| 86 | assert f() == 42 |
| 87 | |
| 88 | |
| 89 | def test_placeholder_type_mismatch(tplaybook): |