File: test_20_main.py

package info (click to toggle)
eccodes-python 2%3A1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,668 kB
  • sloc: python: 2,939; ansic: 268; makefile: 83
file content (13 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
import pytest

from eccodes import __main__


def test_main(capsys):
    __main__.main(argv=["selfcheck"])
    stdout, _ = capsys.readouterr()

    assert "Your system is ready." in stdout

    with pytest.raises(RuntimeError):
        __main__.main(argv=["non-existent-command"])