Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPI: Symlinks with Pytest #22936

Closed
3 tasks done
eleanorjboyd opened this issue Feb 20, 2024 · 3 comments
Closed
3 tasks done

TPI: Symlinks with Pytest #22936

eleanorjboyd opened this issue Feb 20, 2024 · 3 comments

Comments

@eleanorjboyd
Copy link
Member

eleanorjboyd commented Feb 20, 2024

Refs: 22658

Complexity: 3

Author: @eleanorjboyd

Create Issue

Create Issue


Thank you for doing this testing!

  • in terminal cd to parent folder parent
  • create folder inside parent target_folder with tests such as test_example.py (a file with a test inside)
  • from terminal create a symlink ln -s target_folder symlink_to_target_folder (this is for mac specifically)
  • open vscode with the folder symlink_to_target_folder can be done with code symlink_to_target_folder in terminal
  • from command palette use create environment command
  • in terminal install pytest via python -m pip install pytest
  • run test discovery (click beaker icon), test UI will be populated
  • check to make sure the root test explorer view is symlink_to_target_folder
  • click on "go to file" on a test, make sure the symlink file opens
  • try to run tests make sure it works
@roblourens
Copy link
Member

At this step

run test discovery (click beaker icon), test UI will be populated

I had to click "Configure Python Tests", is that right, or is it supposed to pick them up automatically?

@eleanorjboyd
Copy link
Member Author

yes configure python tests is correct! Currently setting the setting "python.testing.pytestEnabled: true" is required to discover which is done via this configure button

@rzhao271 rzhao271 removed their assignment Feb 20, 2024
@luabud luabud removed their assignment Feb 20, 2024
@luabud
Copy link
Member

luabud commented Feb 20, 2024

worked great! 🥳

@luabud luabud closed this as completed Feb 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants