File: test_20_main.py

package info (click to toggle)
eccodes-python 2%3A2.43.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,816 kB
  • sloc: python: 3,518; ansic: 277; sh: 94; makefile: 81; cpp: 30
file content (13 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (5)
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"])