Register a command line option. :param opts: Option names, can be short or long options. :param attrs: Same attributes as the argparse library's :meth:`add_argument() <argparse.ArgumentParser.add_argument>` function accepts. After command
(self, *opts: str, **attrs: Any)
| 103 | return group |
| 104 | |
| 105 | def addoption(self, *opts: str, **attrs: Any) -> None: |
| 106 | """Register a command line option. |
| 107 | |
| 108 | :param opts: |
| 109 | Option names, can be short or long options. |
| 110 | :param attrs: |
| 111 | Same attributes as the argparse library's :meth:`add_argument() |
| 112 | <argparse.ArgumentParser.add_argument>` function accepts. |
| 113 | |
| 114 | After command line parsing, options are available on the pytest config |
| 115 | object via ``config.option.NAME`` where ``NAME`` is usually set |
| 116 | by passing a ``dest`` attribute, for example |
| 117 | ``addoption("--long", dest="NAME", ...)``. |
| 118 | """ |
| 119 | self._anonymous.addoption(*opts, **attrs) |
| 120 | |
| 121 | def parse( |
| 122 | self, |
no outgoing calls