File: test_cli_package.py

package info (click to toggle)
sphinx-theme-builder 0.2.0b2-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 448 kB
  • sloc: python: 2,227; sh: 19; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 440 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys
from unittest import mock

from click import Group
from click.testing import CliRunner


class TestPackageCommand:
    """`stb package`"""

    def test_calls_build(self, runner: CliRunner, cli: Group) -> None:
        with mock.patch("subprocess.run") as mocked_run:
            runner.invoke(cli, ["package"])

        mocked_run.assert_has_calls(
            [mock.call([sys.executable, "-m", "build"], check=True)]
        )