Ask Your Question

Test discovery without test running?

asked 2021-09-01 15:37:50 -0500

Tmr's avatar

updated 2021-09-02 07:40:56 -0500

Is there any way to populate the list of individual tests in Wing's 'Testing' window without executing all the tests in a module? I would like to be able to select an individual test to run without first having to execute all the tests. Something similar to pytest --collect-only.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-09-02 07:40:50 -0500

If you open the test code in the editor and place the caret in the test, using Run Tests at Cursor in the Testing menu should run that test. There are times where this won't help, for example if tests are generated at runtime, but it covers most real world cases.

edit flag offensive delete link more


Are you referring to 'Run Tests' in the right click menu? I wasn't aware of that feature. When I try to use it however I get

ERROR: Not found: path/to/test/|0|

Note the |0| after the test name.

Tmr's avatar Tmr  ( 2021-09-02 15:26:45 -0500 )edit

No, I meant the item in the Testing menu in the menu bar. The context menu item should also work, but appears to be broken in Wing 8 due to changes in the underlying code analysis system. We'll try to fix that soon... thanks for pointing out the problem!

Wingware Support's avatar Wingware Support  ( 2021-09-02 16:24:01 -0500 )edit

Ah, I see it now. The testing menu item works as you describe. Thanks!

If possible, It would also be nice if we could populate tests in the 'Testing' pane without running them. I'm a big fan of that view.

Tmr's avatar Tmr  ( 2021-09-02 17:33:48 -0500 )edit

I think this may only be possible with some testing frameworks, but I agree it would be nice to have.

Wingware Support's avatar Wingware Support  ( 2021-09-03 12:07:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-09-01 15:37:50 -0500

Seen: 182 times

Last updated: Sep 03 '21