Commit 73128d39 authored by Matias Guijarro's avatar Matias Guijarro Committed by Matias Guijarro
Browse files

add test for issue 1781

parent 4eb5f4aa
Pipeline #28131 failed with stages
in 63 minutes and 31 seconds
import subprocess import subprocess
import time import time
import builtins
import pytest import pytest
import numpy import numpy
...@@ -228,6 +228,26 @@ def test_umv_signature(session): ...@@ -228,6 +228,26 @@ def test_umv_signature(session):
assert str(umv.__signature__) == "(*args: 'motor1, pos1, motor2, pos2, ...')" assert str(umv.__signature__) == "(*args: 'motor1, pos1, motor2, pos2, ...')"
def capture_output_patch():
orig_print = builtins.print
from import CaptureOutput
capout = CaptureOutput()
builtins.print = orig_print
def test_umv_shell(capfd, default_session, capture_output_patch):
roby = default_session.config.get("roby")
umv(roby, 1)
output = capfd.readouterr().out.splitlines()
# first 3 items are: empty line, motor name, empty line
assert all(x != "" for x in output[3:])
def test_umvr_lib_mode(capsys, default_session): def test_umvr_lib_mode(capsys, default_session):
"""lprint should not show anything""" """lprint should not show anything"""
Supports Markdown
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