LABGRID-PYTEST(7)
π LABGRID-PYTEST π
okay bestie, so this is the manual page for labgrid-pytest, section 7 of the manual (that's the "miscellaneous" shelf, iykyk). it's the labgrid integration for pytest and it is literally the glue holding your whole test vibe together. let's get into it π«Ά
β¨ NAME β¨
labgrid-pytest β bestie, this is the labgrid integration for pytest. that's it, that's the name, and it's iconic π
β¨ SYNOPSIS β¨
pytest --lg-env *.yaml
like. that's the whole thing. one flag. main character energy fr fr π
β¨ DESCRIPTION β¨
so here's the tea π β labgrid ships with a pytest plugin so it can integrate with the pytest infrastructure. the way that works is: it's activated if the --lg-env parameter is supplied to the pytest command. no flag, no plugin, no magic. the flag IS the vibe check.
once it's switched on, the labgrid plugin parses the configuration yaml file you handed it, exactly as described over in labgrid-device-config(5) π (go read that one, it's the lore). and then β the slay β it lets you use the target and environment fixtures. yes, those fixtures. the good ones. π§
the complete documentation lives at:
https://labgrid.readthedocs.io/en/latest/usage.html#pytest-plugin
go. read it. it's giving "required reading" but make it cute π
β¨ EXAMPLES β¨
okay so imagine you wanna start your tests with myconfig.yaml and a directory called tests. you just do this:
$ pytest --lg-env myconfig.yaml tests
that's it. that's the whole ritual. and then your tests go brrr π₯
π heads up bestie: the original manpage source had a little wobble right here β a System Message saying WARNING/2 atman/labgrid-pytest.rst:, line41, with the text "Cannot analyze code. Pygments package not found." so the.. code-block:: bashdirective didn't get prettied up like it wanted to. not a bug in labgrid, just a missing Pygments package doing its little drama. the command above is still exactly the command. no cap. π
β¨ SEE ALSO β¨
labgrid-device-config(5)β the sister page, the config lore, the origin story πΈ
β¨ AUTHOR β¨
- Rouven Czerwinski
<r.czerwinski@pengutronix.de>β shoutout to the author, we love and respect π«Ά - 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.
π fr fr, that's the license. read it, love it, respect it. LGPL besties stand UP.
and that's the whole page, bestie π slay β¨ this was labgrid-pytest manual page version 0.0.1, dated 2017-04-15, rendered under the LABGRID-PYTEST(7) name. go write some tests, you're gonna eat π
π
π¦ where this page comes from
- debian bookworm: labgrid 0.4.1-6 Β· LGPL-2.1-or-later
- ubuntu jammy: labgrid 0.4.1-2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms