Closed anthrotype closed 1 year ago
rstest
doesn't have any control over it. The parameterized test cases are
desugared as a test module that contains some tests functions (I'm
simplifying it). Maybe vscode can move gutter icons aside the case
attribute but should introduce a rstest
specific hook... I don't think
they will do it.
Il giorno gio 27 apr 2023 alle ore 19:41 Cosimo Lupo < @.***> ha scritto:
as you know, Visual Studio Code lets one run specific tests (when you hover on a test function it detects it is a test and shows a "Run Test" button above it that will call cargo test with that specific test selected). When I use rstest with multiple parametrized cases, multiple Run Test labels will appear but they will be all in one line and get easily truncated on the right if there are lots of them and the screen is not wide enough, see:
[image: Screenshot 2023-04-27 at 18 36 46] https://user-images.githubusercontent.com/6939968/234943839-1f9ccda9-1aaa-4a5d-a1e7-15148128febf.png
Ideally the "Run Test" button would appear right above each #[case(...)] attribute.
I noticed this because I was previously using https://github.com/foresterre/yare to do the parameterized testing and for that one, somehow, vscode can identify the sub-tests and show distinct Run Test buttons above each case definition, e.g.:
[image: image] https://user-images.githubusercontent.com/6939968/234945343-905c820b-9ead-48e5-b0c2-9403a671ae5a.png
I am a newbie and have no idea how these procedural macros even work, but wanted to ask in case anybody knows more, feel free to close thanks.
— Reply to this email directly, view it on GitHub https://github.com/la10736/rstest/issues/195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5Y34LA4OGQKDO6RGIOADLXDKVVRANCNFSM6AAAAAAXOF2Z3Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>
as you know, Visual Studio Code lets one run specific tests (when you hover on a test function it detects it is a test and shows a "Run Test" button above it that will call cargo test with that specific test selected). When I use rstest with multiple parametrized cases, multiple Run Test labels will appear but they will be all in one line and get easily truncated on the right if there are lots of them and the screen is not wide enough, see:
Ideally the "Run Test" button would appear right above each
#[case(...)]
attribute.I noticed this because I was previously using https://github.com/foresterre/yare to do the parameterized testing and for that one, somehow, vscode can identify the sub-tests and show distinct Run Test buttons above each case definition, e.g.:
I am a newbie and have no idea how these procedural macros even work, but wanted to ask in case anybody knows more, feel free to close thanks.