tests.test_manager_pkg moduleΒΆ

FreeBSD pkg output tests.

These tests stub run_cli and replay the samples documented on PKG. They never call pkg.

tests.test_manager_pkg.SEARCH_OUTPUT = '[{"name":"nyancat","origin":"net/nyancat","version":"1.5.2,1","comment":"Animated telnet server that renders a loop of the nyan cat animation"}]'ΒΆ

pkg search --raw --raw-format json-compact --search name nyancat, as the docstring of search() shows it, minus the (...) marker that truncates the record there.

tests.test_manager_pkg.BASE_SEARCH_ARGS = ['search', '--raw', '--raw-format', 'json-compact']ΒΆ

The leading arguments of the three searches the docstring documents.

A match gives its name, comment and version.

This holds for each of the three documented searches.

tests.test_manager_pkg.test_search_without_match(stub_run_cli)[source]ΒΆ

A search matching nothing prints an empty array, which yields no package.