The parse_args() method has a check for whether Gentoo's modules are currently installed.
While this allows the system to fail early, it makes unit testing dependable on installing such packages.
By removing this if() we're able to test argument parsing without on any distro with no package dependance.
Additionally, system's correctness ir preserved since this same check is done later on gentoo.py
# Parse again with any extra distribution files included.
args = parse_args_file_group(argv, os.fspath(default_path), args.distribution)
- if args.distribution == "gentoo":
- from .gentoo import Gentoo
- Gentoo.try_import_portage()
-
args_all["default"] = args
return args_all