-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Making Pytest default for VS code #53203
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
Conversation
The VSCode extension already provides this? I can click on run/run with debug on every individual test right from the IDE in VSCode... |
I may miss VS extension then :-( Simone |
I'm confused about what this PR does at this point, could you explain the difference? |
First I was thinking about adding the Once I learned that there is a better way to proceed (thx for that), I though that we should put Simone |
I think the problem with that (if I remember right) is will always kick off the discovery when you set up / open the environment. This is quite a resource/CPU-intensive operation and I believe Paulus disabled that for that reason. (I might be wrong, digging my possible faulty memory here) |
Seems current version of VS code and Python extension don't trigger a rescan at each start. If otherwise, we can close this PR and just add some info to the docs. Simone |
I'm ok with this personally, @balloob what do you think? |
Yeah I had indeed the issue that it would trigger a re-discover on each save of a file. It also requires to have all requirements installed or else it wouldn't run. I just tried this PR and it is indeed no longer doing this when I hit save. Discovery still crashes because I don't have all requirement installed. However, I still think that running Home Assistant should be the default task. It's |
I think we are using different task/menu entries then ;-) What di PR does is changing the Default Test Task making, not the main debug task. Do I miss something ? Simone |
If that's the case, I am fine with merging this 👍 |
* upstream/dev: (229 commits) Use entity class attributes for canary (home-assistant#53333) Update to PyVicare 1.0 (home-assistant#53281) Do not automatically add title to strings.json (home-assistant#53350) Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 1 (home-assistant#52980) Create APIs for Insteon panel (home-assistant#49785) Bump aionotion to 3.0.2 (home-assistant#53354) Handle more Sonos snapshot restore scenarios (home-assistant#53277) Making Pytest default for VS code (home-assistant#53203) Fix for issue home-assistant#53031 (home-assistant#53343) Add state class and last reset to consumption sensor in devolo Home Control (home-assistant#53337) Fritzbox enable temp sensor (home-assistant#52558) Upgrade wled to 0.7.3 (home-assistant#53340) Use NamedTuple - rainbird (home-assistant#53329) Use entity class attributes for caldav (home-assistant#53332) Add Automate Pulse Hub v2 support (home-assistant#39501) Switch wirelesstag to use cloud push (home-assistant#50984) Remove energy attributes from switch platform in devolo Home Control (home-assistant#53335) Add a homekit.unpair service to forcefully remove pairings (home-assistant#53303) Use NamedTuple - rova (home-assistant#53292) Speedtestdotnet code cleanup and type hints (home-assistant#52533) ...
Proposed change
This small change will allow a user to run
pytest
inside VScode and attach to the debugger to see what's going on.Thx to @Santobert for pointing me to it!
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: