File: test_version.py

package info (click to toggle)
stactools 0.5.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,796 kB
  • sloc: python: 4,498; xml: 554; sh: 395; makefile: 34
file content (22 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pystac
import stactools
from click.testing import CliRunner
from stactools.cli.cli import cli
from stactools.core.utils.subprocess import call


def test_hello_world():
    runner = CliRunner()
    result = runner.invoke(cli, ["version"])
    assert result.exit_code == 0

    assert result.output == (
        f"stactools version {stactools.core.__version__}\n"
        f"PySTAC version {pystac.__version__}\n"
        f"STAC version {pystac.version.get_stac_version()}\n"
    )


def test_entry_point():
    result = call(["stac", "version"])
    assert result == 0