To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 8aed4925 authored by mikolajr's avatar mikolajr
Browse files

In PSI9000 device tests: use f-strings

parent b16daa8d
......@@ -321,11 +321,9 @@ def test_check_master_slave_config(testdev: PSI9000):
test_com.put_name("SYSTem:MS:ENABle?", "ON")
test_com.put_name("SYSTem:MS:LINK?", "MASTER")
test_com.put_name("SYSTem:MS:CONDition?", "INIT")
test_com.put_name("SYSTem:MS:NOMinal:VOLTage?", f"{PSI9000.MS_NOMINAL_VOLTAGE} V")
test_com.put_name(
"SYSTem:MS:NOMinal:VOLTage?", "{} V".format(PSI9000.MS_NOMINAL_VOLTAGE)
)
test_com.put_name(
"SYSTem:MS:NOMinal:CURRent?", "{} A".format(PSI9000.MS_NOMINAL_CURRENT - 1)
"SYSTem:MS:NOMinal:CURRent?", f"{PSI9000.MS_NOMINAL_CURRENT - 1} A"
)
with pytest.raises(PSI9000Error):
power_supply.check_master_slave_config()
......@@ -336,11 +334,7 @@ def test_check_master_slave_config(testdev: PSI9000):
test_com.put_name("SYSTem:MS:ENABle?", "ON")
test_com.put_name("SYSTem:MS:LINK?", "MASTER")
test_com.put_name("SYSTem:MS:CONDition?", "INIT")
test_com.put_name(
"SYSTem:MS:NOMinal:VOLTage?", "{} V".format(PSI9000.MS_NOMINAL_VOLTAGE)
)
test_com.put_name(
"SYSTem:MS:NOMinal:CURRent?", "{} A".format(PSI9000.MS_NOMINAL_CURRENT)
)
test_com.put_name("SYSTem:MS:NOMinal:VOLTage?", f"{PSI9000.MS_NOMINAL_VOLTAGE} V")
test_com.put_name("SYSTem:MS:NOMinal:CURRent?", f"{PSI9000.MS_NOMINAL_CURRENT} A")
power_supply.check_master_slave_config()
assert test_com.get_written() == "SYSTem:MS:INITialisation"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment