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-4/

Python Testing Environment Manager

Create a Python project configuration that uses a testing framework with support for multiple Python versions managed by pyenv.

Requirements

Your task is to set up a testing environment configuration that:

  1. Multi-version Testing: Configure testing across at least three different Python versions (e.g., Python 3.7, 3.8, and 3.9)

  2. Environment Configuration: Create a configuration file that defines:

    • Multiple test environments, one for each Python version
    • A test environment named py37 that uses Python 3.7
    • A test environment named py38 that uses Python 3.8
    • A test environment named py39 that uses Python 3.9
    • Test commands that run pytest for each environment
  3. Test Implementation: Write a simple test file that:

    • Contains at least one basic test function
    • Can be executed by the test runner
    • Demonstrates that the testing setup works correctly
  4. Dependency Management: Ensure your configuration includes pytest as a dependency for the test environments

Test Cases

  • The configuration file exists and is properly formatted @test
  • All three test environments (py37, py38, py39) are defined in the configuration @test
  • The test file contains at least one valid test function @test
  • pytest is listed as a dependency in the configuration @test

Expected Files

@generates

Your implementation should create:

  • tox.ini - The configuration file for the testing framework
  • test_sample.py - A simple test file with at least one test

API

# tox.ini configuration structure
[tox]
envlist = # list of environments

[testenv]
deps = # dependencies
commands = # test commands to run

Dependencies { .dependencies }

pytest { .dependency }

Python testing framework for writing and running tests.

tox-pyenv { .dependency }

Integrates pyenv-managed Python versions with tox testing environments.