Skip to content

Fix broken unittest test discovery - #16594

Closed
Julian Edwards (bigjools) wants to merge 22 commits into
microsoft:test-uifrom
bigjools:fix-test-discovery
Closed

Julian Edwards (bigjools) wants to merge 22 commits into
microsoft:test-uifrom
bigjools:fix-test-discovery

Conversation

@bigjools

@bigjools Julian Edwards (bigjools) commented Jul 1, 2021 •

Copy link
Copy Markdown

Closes #16576

Test discovery with unittest was not working at all. This is now fixed
with a more reliable method. (Issue #16593)

* Update version

* npm audit fix

* New Update

* Update TPN

* Fix build problems

* More build fixes
Discovered the "reference in new issue" command!
* Recommend >= 0.2.0 of `torch-tb-profiler` (microsoft#16440)

* Recommend >= 0.2.0 of torch-tb-profiler

* Update CHANGELOG.md and delete news

* Extract semver requirements into constants

* Update CHANGELOG.md

Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>

Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
* Implement python.defaultInterpreterPath in workspace scope

* Move DeprecatePythonPath experiment to new framework and retire old framework

* Remove execution isolation script

* Do not delete old user setting while migrating interpreter settings

* Modify the python path deprecation prompt

* Add deprecate pythonPath doc in package.json

* Add default Interpreter path entry at the bottom of the interpreter list

* Update VSCode engine to 1.57

* Restore Deprecate PythonPath experiment for compatibility

* Remove environments security related to discovery (microsoft#17)

* Remove environments security related to autoselection (microsoft#18)

* Fix ESLint errors related to security undo work

* Add experiment to package.json

* Edit changelog to include enhancement details

* Delete news entry
microsoft#16487)

* added the link

* fixes

* Add link to docs page on how to install the Python extension to README

* Update news/2 Fixes/15199.md

Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>

Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
* Recommend >= 0.2.0 of `torch-tb-profiler` (microsoft#16440)

* Recommend >= 0.2.0 of torch-tb-profiler

* Update CHANGELOG.md and delete news

* Prep for trusted workspaces work (microsoft#16485)

* Implement python.defaultInterpreterPath in workspace scope

* Move DeprecatePythonPath experiment to new framework and retire old framework

* Remove execution isolation script

* Do not delete old user setting while migrating interpreter settings

* Modify the python path deprecation prompt

* Add deprecate pythonPath doc in package.json

* Add default Interpreter path entry at the bottom of the interpreter list

* Update VSCode engine to 1.57

* Restore Deprecate PythonPath experiment for compatibility

* Remove environments security related to discovery (microsoft#17)

* Remove environments security related to autoselection (microsoft#18)

* Fix ESLint errors related to security undo work

* Add experiment to package.json

* Edit changelog to include enhancement details

* Delete news entry

* Update release candidate for release (microsoft#16490)

* Update change log

* Update version

* Update TPN

* Remove deprecated setting usage in DS smoke test (microsoft#16491)

Co-authored-by: Joyce Er <joyceerhuiling@gmail.com>
Co-authored-by: Kartik Raj <karraj@microsoft.com>
* Fix easier linting issues

* Update eslint-config-prettier

* Basic linting pass on start page

* Update .eslintignore

* Undo switch from arrow fct expression to method

* Updating eslint-config-prettier wasn't a good idea

* Undo a conda line reformatting for testing

* Revert "Undo a conda line reformatting for testing"

This reverts commit a487ce3.

* fix new linting issues

* Formatting issue
)

* Ensure JediLSP restart command is registered only once.

* Add news
* Use getTreatmentVariableAsync

* Fix TB tests

* Update venv tests

* inExperiment -> true

* inDiscoveryExperiment -> true

* Add logging

* More logging

* More more logging

* Even more logging

* Change logging

* USe provider.constructor.name

* Circular commands

* replace json.interpreter(interpreter) with path

* Use provider.constructor.name

* add other logging before getActivationCommands

* Remove both remaining JSON.stringify

* inner logging

* More logging in the env discovery components

* Change a few things

* Remove some of the *2

* Comment out some logs, double timeouts again

* Add and re-add logs

* Try using sync methods

* Re-add isCachedFlightEnabled

* Re-add isCachedFlightEnabled everywhere

* Forgot the await

* Clean up logging

* getTreatmentVariableAsync

* More cleanup

* checkCache to true

* Undo experiment changes after merge with main

* Re-add tensorboard change

* Opt into all experiments

* Add comment

* Undo changes + skip the entire test suite for now

* Skip only on Windows

* Skip on all platforms since all changes were reverted lol

* Why is it so hard to skip an entire test suite
…16560)

* Extract ConcatTextDocument

* Improve text len cache

* 💄

* find input document in iw.

* hook up with jedi middleware

* 💄

* postion is zero based

* isClosed should include input document

* Dispose NotebookConcatDocument

* Properly handle onDidClose

* hide diagnostics for interactive cells

* unnecessary diagnostics filtering.

* class per file.

* update styles.

* Update unit tests

* Try to fix code quality

* fix lint/format

* remove unary operator

* Fix lint

* Fix lint

* Run prettier

* fix input document init.

* 💄

* filter out non-python code.

* Format

* Format

Co-authored-by: rebornix <penn.lv@gmail.com>
Test discovery with unittest was not working at all. This is now fixed
with a more reliable method.  (Issue 16593)
@ghost

Deleted user (ghost) commented Jul 1, 2021 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@bigjools

Copy link
Copy Markdown
Author

I have no experience with Node at all, but I followed the contribution/coding instructions to run tests and all the existing discovery tests seem to pass ok. I don't know if you need more tests, but someone will need to write them for me if so.

See discussion at #16565 for more background.

Somehow I managed to typo such a simple change.
@bigjools

Copy link
Copy Markdown
Author

CI is picking up failures that my local CI run did not get for some reason, are the wiki coding instructions complete? However I see the failure looks genuine, my new code is picking up tests that were not seen beforehand.

@bigjools

Copy link
Copy Markdown
Author

I do now know enough about Typescript to fix these errors. What I do know is that my new code is correct and works as I've run it over actual code bases and it spits out the test list as required, which means that the test inputs are likely broken.

Can someone help please?

@bigjools

Copy link
Copy Markdown
Author

Brett Cannon (@brettcannon) Are you able to help at all here please? I know my new Python discovery works but I don't know what I need to do to fix the tests that are clearly bad tests.

@karrtikr

Copy link
Copy Markdown

Hi Julian Edwards (@bigjools) , thanks for the PR. This was received during the long weekend hence I haven't gotten a chance to look at it yet. Will do it soon.

@bigjools

Copy link
Copy Markdown
Author

Hi - did you manage to check this out yet? (unintentional pun, ha)

@karrtikr Kartik Raj (karrtikr) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My sincerest apologies, thanks for the PR :-)

The implementation itself LGTM but I'm not sure what to do to fix the tests yet. Adding Karthik Nadig (@karthiknadig) who might have a better idea about testing related stuff.

@karrtikr
Kartik Raj (karrtikr) self-requested a review July 15, 2021 07:34
@karthiknadig

Copy link
Copy Markdown
Member

I am re-writing most of the tests for this. So this change should go into the branch that I am working on (test-ui branch).

@karrtikr
Kartik Raj (karrtikr) changed the base branch from main to test-ui July 15, 2021 17:06
@karrtikr

Kartik Raj (karrtikr) commented Jul 15, 2021 •

Copy link
Copy Markdown

Julian Edwards (@bigjools) I tried changing the branch but it picked up a lot of stuff from main. Can you use the test-ui branch and then cherry pick your commits on top of it instead of main?

Or Karthik Nadig (@karthiknadig) , can you rebase test-ui using main so it has the latest commits?

@karrtikr

Copy link
Copy Markdown

UPDATE: Karthik Nadig (@karthiknadig) is handling the rebase part.

@bigjools

Copy link
Copy Markdown
Author

Hey thanks guys. I am in Australia so there's a bit of a delay, but I see someone is working on the rebase. Thanks!

@bigjools

Copy link
Copy Markdown
Author

Also apologies for not being able to contribute more to the tests. Unfortunately I know zero about Typescript, I only know Python.

@karthiknadig

Copy link
Copy Markdown
Member

I have moved your changes to the test-ui branch. See here #16703
Closing this here. You will get credit when that branch is merged with main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

9 participants