diff --git a/tests/samples/BL99P-EA-IOC-05.xml b/tests/samples/BL99P-EA-IOC-05.xml new file mode 100644 index 0000000..ebee17a --- /dev/null +++ b/tests/samples/BL99P-EA-IOC-05.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/test_file_conversion.py b/tests/test_file_conversion.py new file mode 100644 index 0000000..9b7a48a --- /dev/null +++ b/tests/test_file_conversion.py @@ -0,0 +1,15 @@ +import subprocess +import sys + + +def test_cli_version(): + cmd = [sys.executable, "-m", "builder2ibek", "file", "--yaml", "out.yaml", "tests/samples/BL45P-MO-IOC-01.xml"] + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + assert result.stderr == b"" + + cmd = [sys.executable, "-m", "builder2ibek", "file", "--yaml", "out.yaml", "tests/samples/BL99P-EA-IOC-05.xml"] + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + assert result.stderr == b"" + + +