LABGRID-PYTEST(7)

πŸ“¦
version 0.4.1 Β· 2 versions
, in debian bookworm, ubuntu jammy

πŸ’– 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 at man/labgrid-pytest.rst:, line 41, with the text "Cannot analyze code. Pygments package not found." so the .. code-block:: bash directive 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 ✨


✨ AUTHOR ✨

  • Rouven Czerwinski <r.czerwinski@pengutronix.de> β€” shoutout to the author, we love and respect 🫢
  • Organization: Labgrid-Project πŸ‘‘

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