Stop sweep after reset, fix failing tests

This commit is contained in:
Jan Käberich 2024-04-22 15:08:10 +02:00
parent c5d045364c
commit 0fc6c912fc
10 changed files with 38 additions and 17 deletions

View file

@ -1,6 +1,7 @@
import unittest
testmodules = [
'tests.TestUpdate', # Must go first because it updates the connected VNA to the firwmare which should be tested
'tests.TestConnect',
'tests.TestStatusRegisters',
'tests.TestMode',

View file

@ -153,7 +153,7 @@ class TestCalibration(TestBase):
# Start measurement and grab data
self.vna.cmd(":VNA:ACQ:SINGLE TRUE")
self.assertEqual(self.vna.query(":VNA:ACQ:FIN?"), "FALSE")
self.vna.cmd("*WAI")
self.vna.cmd("*WAI", timeout=3)
self.assertEqual(self.vna.query(":VNA:ACQ:FIN?"), "TRUE")
cal.reset()

View file

@ -225,7 +225,7 @@ class TestRST(TestBase):
self.vna.cmd("SA:TRACK:EN TRUE")
self.vna.cmd(f"SA:TRACK:LVL {pwr_1_2}")
self.vna.cmd("SA:TRACK:NORM:EN TRUE")
self.vna.cmd("SA:TRACK:NORM:LVL {pwr_1_3}")
self.vna.cmd(f"SA:TRACK:NORM:LVL {pwr_1_3}")
self.vna.cmd("SA:TRACK:OFF 1.0e+6;PORT 2")
self.vna.cmd("VNA:ACQ:AVG 10")
self.vna.cmd(f"VNA:ACQ:IFBW {ifbw_1_2}")
@ -236,6 +236,9 @@ class TestRST(TestBase):
self.vna.cmd(f"VNA:STIM:FREQ {f_1_3}")
self.vna.cmd(f"VNA:STIM:LVL {pwr_min}")
self.vna.cmd("VNA:SWEEP POWER")
# We just configured a lot of settings, give some time to empty the output queue from the GUI to the device
time.sleep(2)
# Reset and verify all settings revert.
self.vna.cmd("*RST")