File: test_arguments.py

package info (click to toggle)
pmbootstrap 3.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,852 kB
  • sloc: python: 17,099; sh: 425; makefile: 17
file content (19 lines) | stat: -rw-r--r-- 526 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright 2025 Pablo Correa Gomez
# SPDX-License-Identifier: GPL-3.0-or-later

from pmb.parse import get_parser


def test_chroot_simple() -> None:
    parser = get_parser()
    args = parser.parse_args("chroot ls".split())
    assert args.action == "chroot"
    assert args.command == ["ls"]


def test_chroot_args() -> None:
    parser = get_parser()
    args = parser.parse_args("chroot --rootfs -- ls -l".split())
    assert args.action == "chroot"
    assert args.rootfs is True
    assert args.command == ["ls", "-l"]