meta_package_manager.tests.case module

meta_package_manager.tests.case.skip_destructive()[source]

Decorator to skip a test unless destructive mode is allowed.

Destructive mode is activated by the presence of a DESTRUCTIVE_TESTS environment variable set to True.

meta_package_manager.tests.case.unless_linux()[source]

Decorator to skip a test unless it is run on a Linux system.

meta_package_manager.tests.case.unless_macos()[source]

Decorator to skip a test unless it is run on a macOS system.

meta_package_manager.tests.case.unless_windows()[source]

Decorator to skip a test unless it is run on a Windows system.

class meta_package_manager.tests.case.CLITestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Utilities and helpers to easely write unit-tests.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]
print_cli_output(cmd, output)[source]

Simulate CLI output.

Used to print debug traces in test suites.

run_cmd(*args)[source]

Run a system command, print output and return results.

invoke(*args)[source]

Executes Click’s CLI, print output and return results.