tests.test_manager_guix moduleΒΆ

GNU Guix output tests.

They replay what Guix printed on Guix System aarch64-linux: release 1.5.0, and master commit 5ef098e1 once guix pull ran. So they need neither guix nor a Guix host.

tests.test_manager_guix.LIST_INSTALLED = 'hello          \t2.12.2\tout\t/gnu/store/8qjzxdk26p8c5nyj98s3321vbkmv9za0-hello-2.12.2\nlua            \t5.1.5 \tout\t/gnu/store/sq2sj9gj8bqzgv493249xd8gzhhw1f0x-lua-5.1.5\nglib           \t2.83.3\tout\t/gnu/store/h95r1yvlbrlqap6l8fsdzp7lpxair7sv-glib-2.83.3\nglib           \t2.83.3\tbin\t/gnu/store/06w4p65r8hli2qnsdsnp0l8r1zghz5qr-glib-2.83.3-bin\nglib-networking\t2.78.1\tout\t/gnu/store/n4nicicydz8d24m2qi3ddwlcxlr534qn-glib-networking-2.78.1\n'ΒΆ

guix package --list-installed, with the bin output of glib installed.

tests.test_manager_guix.UPGRADE_REPORT = "guix upgrade: warning: Consider running 'guix pull' followed by\n'guix package -u' to get up-to-date packages and security updates.\n\nThe following package would be upgraded:\n   lua 5.1.5 β†’ 5.4.8\n\n"ΒΆ

What guix upgrade --dry-run writes to <stderr>, with <stdout> empty.

tests.test_manager_guix.PULLED_UPGRADE_REPORT = 'The following packages would be upgraded:\n   glib            2.83.3 β†’ 2.86.0\n   glib-networking 2.78.1 β†’ 2.80.1\n   glib:bin        2.83.3 β†’ 2.86.0\n   hello           2.12.2 β†’ 2.12.3\n   lua             5.1.5 β†’ 5.5.0\n\n22.6 MB would be downloaded\n'ΒΆ

The same report once guix pull ran: padded names, and one row per output.

tests.test_manager_guix.SEARCH_OUTPUT = "name: cowsay\nversion: 3.8.4\noutputs:\n+ out: everything\nsystems: x86_64-linux mips64el-linux aarch64-linux powerpc64le-linux\n+ i686-linux armhf-linux powerpc-linux\ndependencies: perl@5.36.0\nlocation: gnu/packages/games.scm:1431:2\nhomepage: https://web.archive.org/web/20071026043648/http://www.nog.net:80/~tony/warez/cowsay.shtml\nlicense: GPL 3+\nsynopsis: Speaking cow text filter  \ndescription: Cowsay is basically a text filter.  Send some text into it, and\n+ you get a cow saying your text.  If you think a talking cow isn't enough, cows\n+ can think too: all you have to do is run `cowthink'.  If you're tired of cows,\n+ a variety of other ASCII-art messengers are available.\nrelevance: 32\n\nname: python-snakesay\nversion: 0.10.4\noutputs:\n+ out: everything\nsystems: x86_64-linux mips64el-linux aarch64-linux powerpc64le-linux\n+ i686-linux armhf-linux powerpc-linux\ndependencies: python-pytest@8.4.1 python-setuptools@80.9.0\nlocation: gnu/packages/python-xyz.scm:2293:2\nhomepage: https://github.com/pythonanywhere/snakesay\nlicense: Expat\nsynopsis: Like `cowsay' but with Python flavor  \ndescription: This package provides a simple ASCII art pictures generator of a\n+ Snake with a message.\nrelevance: 3\n\n"ΒΆ

guix search cowsay, whose synopses end with two spaces.

tests.test_manager_guix.SEARCH_GTK_OUTPUT = 'name: gtk+\nversion: 3.24.51\noutputs:\n+ bin: executable programs and scripts\n+ out: everything else\nsystems: x86_64-linux aarch64-linux\ndependencies: at-spi2-core@2.52.0 cairo@1.18.4 colord-minimal@1.4.6\n+ cups@2.4.14 docbook-xml@4.3 docbook-xsl@1.79.2-0.fe16c90\n+ fontconfig-minimal@2.14.0 freetype@2.13.3 fribidi@1.0.12\n+ gettext-minimal@0.23.1 glib@2.83.3 gobject-introspection@1.82.0\n+ graphene@1.10.8 harfbuzz@11.4.4 hicolor-icon-theme@0.17 iso-codes@4.5.0\n+ json-glib-minimal@1.10.0 libcloudproviders-minimal@0.3.6 libepoxy@1.5.10\n+ librsvg@2.58.5 libx11@1.8.12 libxcomposite@0.4.6 libxcursor@1.2.3\n+ libxdamage@1.1.6 libxext@1.3.6 libxfixes@6.0.1 libxi@1.8.2 libxinerama@1.1.5\n+ libxkbcommon@1.11.0 libxml2@2.14.6 libxrandr@1.5.4 libxrender@0.9.12\n+ libxslt@1.1.43 mesa@25.2.3 pango@1.54.0 pkg-config@0.29.2\n+ python-wrapper@3.11.14 rest@0.8.1 sassc@3.6.2 wayland-protocols@1.45\n+ wayland@1.24.0 xorg-server@21.1.15\nlocation: gnu/packages/gtk.scm:1010:2\nhomepage: https://www.gtk.org/\nlicense: LGPL 2.0+\nsynopsis: Cross-platform toolkit for creating graphical user interfaces  \ndescription: GTK+, or the GIMP Toolkit, is a multi-platform toolkit for\n+ creating graphical user interfaces.  Offering a complete set of widgets, GTK+\n+ is suitable for projects ranging from small one-off tools to complete\n+ application suites.\nrelevance: 30\n\nname: gtk+\nversion: 2.24.33\noutputs:\n+ bin: executable programs and scripts\n+ doc: documentation\n+ debug: debug information\n+ out: everything else\nsystems: x86_64-linux aarch64-linux\ndependencies: at-spi2-core@2.52.0 cairo@1.18.4 cups@2.4.14\n+ gettext-minimal@0.23.1 glib@2.83.3 gobject-introspection@1.82.0\n+ intltool@0.51.0 librsvg@2.58.5 libx11@1.8.12 libxcomposite@0.4.6\n+ libxcursor@1.2.3 libxdamage@1.1.6 libxext@1.3.6 libxi@1.8.2 libxinerama@1.1.5\n+ libxkbcommon@1.11.0 libxrandr@1.5.4 libxrender@0.9.12 libxshmfence@1.3.3\n+ pango@1.54.0 perl@5.36.0 pkg-config@0.29.2 python-wrapper@3.11.14\n+ xorg-server@21.1.15\nlocation: gnu/packages/gtk.scm:907:2\nhomepage: https://www.gtk.org/\nlicense: LGPL 2.0+\nsynopsis: Cross-platform toolkit for creating graphical user interfaces  \ndescription: GTK+, or the GIMP Toolkit, is a multi-platform toolkit for\n+ creating graphical user interfaces.  Offering a complete set of widgets, GTK+\n+ is suitable for projects ranging from small one-off tools to complete\n+ application suites.\nrelevance: 30\n\n'ΒΆ

guix search ^gtk\+$: two versions under one name, with different outputs.

tests.test_manager_guix.guix(monkeypatch)[source]ΒΆ
tests.test_manager_guix.test_installed_strips_padding_and_names_outputs(guix, stub_run_cli)[source]ΒΆ
tests.test_manager_guix.test_outdated_reads_the_report_from_stderr(guix, monkeypatch, report, expected)[source]ΒΆ
tests.test_manager_guix.test_search_strips_synopsis_padding(guix, stub_run_cli)[source]ΒΆ
tests.test_manager_guix.test_search_reports_a_name_once(guix, stub_run_cli, query, expected)[source]ΒΆ

mpm install fails when its exact search returns more than one package.

tests.test_manager_guix.test_search_for_an_output_matches_the_name_alone(guix, monkeypatch)[source]ΒΆ
tests.test_manager_guix.test_upgrade_one_matches_the_name_alone(guix, package_id, regexp)[source]ΒΆ

guix upgrade glib would also upgrade glib-networking.