Skip to content

Conversation

@dazfuller
Copy link

@dazfuller dazfuller commented Jul 2, 2022

This is related to issues #5721 and #6881 and adds support for the -t/--top-level-directory argument for test discovery when using unittest.

The following changes have been made.

  • add new function unittestGetTopLevelDirectory to get top level directory value from options
  • If provided then pass this value to the test discovery and test runner processes
    • If not provided then it is omitted so that tests continue to run as they do currently
  • Uses the --ut option already available in the visualstudio_py_testlauncher.py script

The import cleanup in the python files was done automatically by pylance.

@ghost
Copy link

ghost commented Jul 2, 2022

CLA assistant check
All CLA requirements met.

@karthiknadig karthiknadig self-requested a review July 7, 2022 18:18
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Jul 7, 2022
@dazfuller
Copy link
Author

Reviewed the testing page on the wiki, the edited TS files are not currently part of any test suite. Please advise

@karthiknadig karthiknadig added the skip tests Updates to tests unnecessary label Jul 7, 2022
@karthiknadig
Copy link
Member

@dazfuller I have cleared the check for you. No worries.

@karthiknadig karthiknadig requested a review from anthonykim1 July 7, 2022 19:09
@karthiknadig karthiknadig merged commit 4ecf02b into microsoft:main Jul 14, 2022
@dazfuller dazfuller deleted the dazfuller/unittest-topleveldir branch July 18, 2022 13:42
wesm pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
* update unittest discovery to work with user defined top-level-directory

* change to make top-level-dir optional

* add top-level-dir to unittest run args

* update test discovery to use top-level-directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug skip tests Updates to tests unnecessary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants