or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/tox-pyenv@1.1.x
tile.json

tessl/pypi-tox-pyenv

tessl install tessl/pypi-tox-pyenv@1.1.0

tox plugin that makes tox use `pyenv which` to find python executables

Agent Success

Agent success rate when using this tile

98%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.03x

Baseline

Agent success rate without this tile

95%

task.mdevals/scenario-1/

Custom Tox Plugin with Configuration

Build a tox plugin that adds custom configuration options to control test verbosity. The plugin should allow users to configure verbosity through both command-line arguments and tox.ini configuration, with the command-line taking precedence when both are specified.

Requirements

Your plugin must implement a hook that extends tox's argument parser and configuration system to add verbosity control.

Command-Line Support

Add a command-line flag --verbose-output (short form: -V) that enables verbose test output. By default, verbose output should be disabled.

Configuration File Support

Add a configuration attribute named verbose_output that can be set in the [testenv] section of tox.ini. This attribute should:

  • Accept boolean values (true/false)
  • Default to false if not specified

Plugin Integration Requirements

  • Organize your custom options in a dedicated argument group titled "verbosity plugin options"
  • Use tox's testenv attribute system to register the configuration option
  • Implement postprocessing logic to merge command-line and config file settings, ensuring command-line takes precedence

Test Cases

  • Setting --verbose-output on the command line enables verbose mode regardless of tox.ini settings @test
  • When verbose_output = true is set in tox.ini and no CLI flag is provided, verbose mode is enabled @test
  • When neither CLI flag nor config file setting is provided, verbose mode defaults to disabled @test

Implementation

@generates

API

from tox import hookimpl

@hookimpl
def tox_addoption(parser):
    """Add command line and configuration options for verbosity control."""
    pass

Dependencies { .dependencies }

tox { .dependency }

Provides the plugin system and configuration framework.