This commit is contained in:
+17
-1
@@ -151,4 +151,20 @@ def test_orig_repr_is_not_custom_repr():
|
||||
|
||||
# Check that the original repr looks like a real epics PV
|
||||
assert original.startswith("<PV ")
|
||||
assert "TEST:VAL" in original
|
||||
assert "TEST:VAL" in original
|
||||
|
||||
def test_put_without_progress(capture_stdout):
|
||||
pv = PV("TEST:VAL", connection_timeout=2.0)
|
||||
assert pv.wait_for_connection(timeout=2.0), "PV not connected"
|
||||
|
||||
initial_value = pv.get()
|
||||
new_value = initial_value + 10
|
||||
|
||||
# Capture stdout
|
||||
stdout_before = capture_stdout.getvalue()
|
||||
pv.put(new_value, show_progress=False)
|
||||
stdout_after = capture_stdout.getvalue()
|
||||
|
||||
# Verify no output was produced
|
||||
assert stdout_before == stdout_after, "Expected no output when show_progress=False"
|
||||
assert pv.get() == pytest.approx(new_value)
|
||||
Reference in New Issue
Block a user