Commit 0c1f9def authored by ∞'s avatar 💻

Update tests

parent 4981f597
......@@ -14,9 +14,8 @@ import pytest
('run_module_missing_attr', 'cli2.missing'),
('run_module_missing', 'missinggggggg.foo'),
('run_module_nodoc', 'test_cli2.test_cli2'),
('help_module', 'help pytest'),
('help_module_attr', 'help pytest.skip'),
('help_module_attr_notfound', 'help pytest.skipppp'),
('help_module', 'help cli2'),
('help_module_attr_notfound', 'help cli2.skipppp'),
('docmod', 'docmod cli2'),
('docmod_noargs', 'docmod'),
('docfile', 'docfile cli2.py'),
......
command: cli2 help pytest
command: cli2 help cli2
retcode: 1
stdout:
cli2 makes your python callbacks work on CLI too !
pytest: unit and functional testing with Python.
cli2 provides sub-commands to introspect python modules or callables docstrings
or to execute callables or help working with cli2 itself.
help Get help for a command.
approx Assert that two numbers (or two sets of numbers) are equal to each other
deprecated_call context manager that can be used to ensure a block of code triggers a
ensuretemp (deprecated) return temporary directory path with
exit Exit testing process as if KeyboardInterrupt was triggered.
fail Explicitly fail an executing test with the given message.
fixture Decorator to mark a fixture factory function.
freeze_includes Returns a list of module names used by pytest that should be
hookimpl Decorator helper class for marking functions as hook implementations.
hookspec Decorator helper class for marking functions as hook specifications.
importorskip return imported module if it has at least "minversion" as its
main return exit code, after performing an in-process test run.
param Specify a parameter in `pytest.mark.parametrize`_ calls or
raises Assert that a code block/function call raises ``expected_exception``
register_assert_rewrite Register one or more module names to be rewritten on import.
set_trace invoke PDB set_trace debugging, dropping any IO capturing.
skip Skip an executing test with the given message.
warns Assert that code raises a particular class of warning.
xfail Imperatively xfail an executing test or setup functions with the given reason.
yield_fixture (return a) decorator to mark a yield-fixture factory function.
help Get help for a command.
config config(**config)
debug Dump parsed variables.
docfile Docstring for a file path.
docmod Docstring for a module in dotted path.
run Execute a python callback on the command line.
command: cli2 help pytest.skip
retcode: 1
stdout:
Signature: pytest.skip(msg='', **kwargs)
Skip an executing test with the given message.
This function should be called only during testing (setup, call or teardown) or
during collection by using the ``allow_module_level`` flag.
:kwarg bool allow_module_level: allows this function to be called at
module level, skipping the rest of the module. Default to False.
.. note::
It is better to use the :ref:`pytest.mark.skipif ref` marker when possible to declare a test to be
skipped under certain conditions like mismatching platforms or
dependencies.
command: cli2 help pytest.skipppp
command: cli2 help cli2.skipppp
retcode: 1
stdout:
Cannot import pytest.skipppp
Showing help for pytest
Cannot import cli2.skipppp
Showing help for cli2
cli2 makes your python callbacks work on CLI too !
pytest: unit and functional testing with Python.
cli2 provides sub-commands to introspect python modules or callables docstrings
or to execute callables or help working with cli2 itself.
help Get help for a command.
approx Assert that two numbers (or two sets of numbers) are equal to each other
deprecated_call context manager that can be used to ensure a block of code triggers a
ensuretemp (deprecated) return temporary directory path with
exit Exit testing process as if KeyboardInterrupt was triggered.
fail Explicitly fail an executing test with the given message.
fixture Decorator to mark a fixture factory function.
freeze_includes Returns a list of module names used by pytest that should be
hookimpl Decorator helper class for marking functions as hook implementations.
hookspec Decorator helper class for marking functions as hook specifications.
importorskip return imported module if it has at least "minversion" as its
main return exit code, after performing an in-process test run.
param Specify a parameter in `pytest.mark.parametrize`_ calls or
raises Assert that a code block/function call raises ``expected_exception``
register_assert_rewrite Register one or more module names to be rewritten on import.
set_trace invoke PDB set_trace debugging, dropping any IO capturing.
skip Skip an executing test with the given message.
warns Assert that code raises a particular class of warning.
xfail Imperatively xfail an executing test or setup functions with the given reason.
yield_fixture (return a) decorator to mark a yield-fixture factory function.
help Get help for a command.
config config(**config)
debug Dump parsed variables.
docfile Docstring for a file path.
docmod Docstring for a module in dotted path.
run Execute a python callback on the command line.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment