Skip to main content
FixturFab

Installation

How to install pytest-f3ts and its dependencies for hardware functional testing.

pytest-f3ts requires Python 3.9 or later. The package is available on PyPI and can be installed with pip or your preferred package manager.

Basic Installation#

pip install pytest-f3ts

This installs the core plugin with minimal dependencies. For most hardware testing scenarios, you'll also want the instrumentation support:

pip install pytest-f3ts[instruments]

Installation Options#

pytest-f3ts supports several optional dependency groups:

GroupCommandIncludes
Corepip install pytest-f3tsBasic plugin, serial support
Instrumentspip install pytest-f3ts[instruments]Core + f3ts-hardware-utils
Developmentpip install pytest-f3ts[dev]Core + testing and linting tools
Allpip install pytest-f3ts[all]Everything

Requirements#

  • Python 3.9+
  • pytest 7.0+
  • pyserial 3.5+ (included in core)

For instrument control:

  • f3ts-hardware-utils 0.4+ (included in [instruments])
  • pyvisa 1.13+ (for VISA instruments)

Virtual Environment Setup#

We recommend using a virtual environment for test development:

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or: .venv\Scripts\activate  # Windows
 
# Install pytest-f3ts with instrument support
pip install pytest-f3ts[instruments]

Verifying Installation#

After installation, verify the plugin is available:

pytest --version
# Should show pytest version
 
pytest --co
# Should list available fixtures including hardware_fixture, measure

You can also check the plugin is loaded:

import pytest_f3ts
print(pytest_f3ts.__version__)

Platform-Specific Notes#

Linux#

Serial port access typically requires adding your user to the dialout group:

sudo usermod -a -G dialout $USER
# Log out and back in for changes to take effect

For USB instruments, you may need udev rules. See the f3ts-hardware-utils documentation for details.

Windows#

Install the appropriate USB drivers for your instruments before using pytest-f3ts. Most modern instruments are recognized automatically, but some require manufacturer-specific drivers.

macOS#

Serial ports are available without additional configuration. For VISA instruments, install NI-VISA or the appropriate vendor drivers.

Next Steps#

Last updated:January 10, 2025