id = "pytest" name = "pytest" description = "Python testing framework for writing and running small to large tests." homepage = "https://docs.pytest.org" executables = ["pytest"] [commands] format = 1 label = "Run tests" description = "Run Python tests with the common selection, output and failure options. Plugin options and configuration overrides are left out." quality = "ai-draft" base = "fig:pytest" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pytest.ts" license = "MIT" [[commands.field]] id = "targets" label = "Files or directories" description = "Leave empty to collect tests from the current directory." type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "keyword" label = "Name expression (-k)" description = "Only run tests whose names match this expression." type = "string" option = ["-k"] sources = ["fig"] [[commands.field]] id = "marks" label = "Mark expression (-m)" type = "string" option = ["-m"] sources = ["fig"] [[commands.field]] id = "exitfirst" label = "Stop at first failure" type = "boolean" option = ["--exitfirst", "-x"] sources = ["fig"] [[commands.field]] id = "maxfail" label = "Stop after N failures" type = "integer" option = ["--maxfail"] sources = ["fig"] [[commands.field]] id = "last_failed" label = "Rerun last failures" type = "boolean" option = ["--last-failed", "--lf"] sources = ["fig"] [[commands.field]] id = "failed_first" label = "Failures first" type = "boolean" option = ["--failed-first", "--ff"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbosity" type = "count" option = ["--verbose", "-v"] sources = ["fig"] [[commands.field]] id = "quiet" label = "Quiet" type = "boolean" option = ["--quiet", "-q"] sources = ["fig"] [[commands.field]] id = "no_capture" label = "Show print output (no capture)" type = "boolean" option = ["-s"] sources = ["fig"] [[commands.field]] id = "tb" label = "Traceback style" type = "enum" option = ["--tb"] choices = [{ value = "auto", label = "Auto" }, { value = "long", label = "Long" }, { value = "short", label = "Short" }, { value = "line", label = "One line" }, { value = "native", label = "Native" }, { value = "no", label = "None" }] sources = ["fig"] [[commands.field]] id = "pdb" label = "Debugger on failure" type = "boolean" option = ["--pdb"] sources = ["fig"] [[commands.field]] id = "collect_only" label = "Collect only" type = "boolean" option = ["--collect-only", "--co"] sources = ["fig"] [[commands.task]] id = "run" label = "Run tests" fields = ["targets", "keyword", "verbose", "tb"] required = [] [[commands.task]] id = "rerun-failed" label = "Rerun failures" set = { last_failed = [true] } fields = ["targets", "verbose", "tb", "exitfirst"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["targets", "keyword", "marks", "exitfirst", "last_failed", "verbose", "tb"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["maxfail", "failed_first", "quiet", "no_capture", "pdb", "collect_only"]