Skip to content

Homebrew packages can't be asserted via the host.package module on Linux #788

Open
@coaxial

Description

@coaxial

Would it be possible to make it work for Linux too? It only works for macOS at the moment.

As an alternative if this helps anyone, I am doing this:

# host.package doesn't work with homebrew packages on Linux
def test_homebrew_packages(host):
    packages = {
        'git-delta': re.compile(r'delta \d+\.\d+\.\d+', re.M),
        'hub': re.compile(r'hub version .*', re.M),
    }

    for package, version_re in packages.items():
        version = host.run("bash -l -c " + package + " --version").stdout

        assert version_re.match(version)

Not as robust as using the package module but better than nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions