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

Instrument tests: Avoid leaking state between tests #5360

Merged

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Sep 13, 2023

When all pyvisa-sim instruments defined by a yaml file is closed reset the instruments. This in practice will ensure that every test will reset the state of pyvisa-sim instruments on exit since the test must close instruments anyway.

closes #5356

See pyvisa/pyvisa-sim#83 for details

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #5360 (9ccc96a) into master (fb1a5fa) will increase coverage by 0.07%.
Report is 15 commits behind head on master.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##           master    #5360      +/-   ##
==========================================
+ Coverage   68.14%   68.22%   +0.07%     
==========================================
  Files         341      341              
  Lines       29845    29847       +2     
==========================================
+ Hits        20339    20362      +23     
+ Misses       9506     9485      -21     

@jenshnielsen jenshnielsen force-pushed the jenshnielsen/cleanup_visa_inst_tests branch from 5a03b80 to 62bc106 Compare September 23, 2023 18:12
@jenshnielsen jenshnielsen force-pushed the jenshnielsen/cleanup_visa_inst_tests branch from 62bc106 to adcd46c Compare September 23, 2023 19:11
@jenshnielsen jenshnielsen marked this pull request as ready for review September 24, 2023 04:52
qcodes/instrument/ip_to_visa.py Show resolved Hide resolved
@jenshnielsen jenshnielsen added this pull request to the merge queue Sep 25, 2023
Merged via the queue into microsoft:master with commit 46260f6 Sep 25, 2023
@jenshnielsen jenshnielsen deleted the jenshnielsen/cleanup_visa_inst_tests branch September 25, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyvisa sim instruments are not cleanup on close.
2 participants