arch.test¶
-
arch.test(extra_args: str | list[str] | None =
None, exit: bool =True, append: bool =True, location: str ='') int[source]¶ Run the tests of the installed package.
Exit with the status code of the test run upon completion if
exitis True.- Parameters:¶
- extra_args: str | list[str] | None =
None¶ Extra arguments to pass to pytest. The default options are –tb=auto and –disable-pytest-warnings. The extra arguments are added to the default options if
appendis True and replace them otherwise.- exit: bool =
True¶ If True, exit the Python interpreter with the status code of the test run. If False, return the status code.
- append: bool =
True¶ If True, add
extra_argsto the default options. If False, use onlyextra_args.- location: str =
''¶ The location of the tests to run, as a path relative to the directory of the installed
archpackage. The default runs all of the tests of the package.
- extra_args: str | list[str] | None =
- Returns:¶
The pytest exit status. Only returned if
exitis False.- Return type:¶
- Raises:¶
TypeError – If
exitorappendis not a bool.ImportError – If pytest is not installed.
RuntimeError – If the location of the tests does not exist.