pytest-cocotbΒΆ

A pytest plugin that integrates cocotb HDL simulation into your normal pytest workflow. Compile once per session, then run individual cocotb testbenches as regular pytest test cases with full parametrisation, fixture, and reporting support.

Contents

  • Quickstart
    • Installation
    • Minimal example
    • Single-file tests
    • Running
    • Setting defaults
  • Plugin reference
    • CLI options
    • Fixtures
    • TestSession API
    • Build behaviour
    • Output directory layout
  • Examples
    • Basic counter test
    • Parametrised tests
    • Overriding test_module in run()
    • Using --waves
    • Using --defines
    • Using --parameters
    • Using --filelist
    • Using --includes
    • Using --build-args
    • Using --regress
    • Using --modules
    • Setting defaults in conftest.py
    • Log file behaviour
  • HPC support
    • Overview
    • Supported simulators
    • How it works
    • Scheduler configuration
    • Environment modules
    • Example usage
    • API reference
  • NFS locking and xdist support
    • Why NFS locking?
    • NFSLock
    • CallOnce
    • Plugin integration
    • API reference
  • Developer guide
    • Development setup
    • Running tests
    • Building documentation
    • Plugin architecture
    • HPC mixin pattern
    • Code organisation
    • How to add a new simulator
    • Test suite structure

pytest-cocotb

Navigation

Contents

  • Quickstart
  • Plugin reference
  • Examples
  • HPC support
  • NFS locking and xdist support
  • Developer guide

Related Topics

  • Documentation overview
    • Next: Quickstart
©2026, pytest-cocotb contributors. | Powered by Sphinx 8.1.3 & Alabaster 1.0.0 | Page source