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-f3tsThis 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:
| Group | Command | Includes |
|---|---|---|
| Core | pip install pytest-f3ts | Basic plugin, serial support |
| Instruments | pip install pytest-f3ts[instruments] | Core + f3ts-hardware-utils |
| Development | pip install pytest-f3ts[dev] | Core + testing and linting tools |
| All | pip 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, measureYou 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 effectFor 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#
- Configuration - Set up your hardware configuration file
- Examples - See pytest-f3ts in action