functional2: add expect-test support #595

Open
opened 2024-12-05 22:19:05 +00:00 by jade · 1 comment
Owner

This will require some adjustment of the expect-test library for python to support parameterization and maybe add slightly better pytest support, since the current way it works is kind of ugly.

Also of note, there is a pytest-expecttest thing; please do not use it; it captures stdout/stderr for the expectations (why?!), whereas the unittest one it was taken from has a much more reasonable design.

The point of this is that we can have really nice inline test-cases for one-liners that snapshot the exact output, sort of like repl characterization.

(n.b. hmm, repl characterization could have totally been a python thing. maybe it will become one later. maybe not. it is not a big deal regardless)

Upstream bug: https://github.com/pytorch/expecttest/issues/25

This will require some adjustment of the expect-test library for python to support parameterization and maybe add slightly better pytest support, since the current way it works is kind of ugly. Also of note, there is a pytest-expecttest thing; please do not use it; it captures stdout/stderr for the expectations (why?!), whereas the unittest one it was taken from has a much more reasonable design. The point of this is that we can have really nice inline test-cases for one-liners that snapshot the exact output, sort of like repl characterization. (n.b. hmm, repl characterization could have totally been a python thing. maybe it will become one later. maybe not. it is not a big deal regardless) Upstream bug: https://github.com/pytorch/expecttest/issues/25
jade added the
testing
devx
labels 2024-12-05 22:19:05 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2279 ("tests/functional2: add terminal code eater")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2279", "number": 2279, "kind": "commit message"}], "cl_meta": {"2279": {"change_title": "tests/functional2: add terminal code eater"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2279](https://gerrit.lix.systems/c/lix/+/2279) ("tests/functional2: add terminal code eater")
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#595
No description provided.