---
name: "labgrid-pytest"
section: "7"
platform: "linux"
package: "labgrid"
version: "0.4.1-6"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/labgrid-pytest"
---

# labgrid-pytest(7)

labgrid-pytest labgrid integration for pytest

## NAME

labgrid-pytest - labgrid-pytest labgrid integration for pytest

## SYNOPSIS

**pytest --lg-env** **\*.yaml**

## DESCRIPTION

Labgrid ships a pytest plugin to integrate with the pytest infrastructure. It is activated if the *--lg-env* parameter is supplied to the pytest command.

The labgrid plugin parses the supplied configuration yaml file as described in [**labgrid-device-config**(5)](/labgrid-device-config/5.md) and allows the usage of the target and environment fixtures. The complete documentation is available at *https://labgrid.readthedocs.io/en/latest/usage.html#pytest-plugin*.

## EXAMPLES

Start tests with **myconfig.yaml** and directory **tests**:

- System Message: WARNING/2 (man/labgrid-pytest.rst:, line 41)

  Cannot analyze code. Pygments package not found.

  ```
  .. code-block:: bash
     $ pytest --lg-env myconfig.yaml tests
  ```

## SEE ALSO

[**labgrid-device-config**(5)](/labgrid-device-config/5.md)

## AUTHOR

Rouven Czerwinski \<r.czerwinski@pengutronix.de\>

Organization: Labgrid-Project

## COPYRIGHT

Copyright (C) 2016-2017 Pengutronix. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
