python3-glances: fix ptest args being consumed by GlancesMain's argv slicing

tests/test_core.py does GlancesMain(args_begin_at=2) at module import
time, slicing the real process sys.argv. Passing --automake on the
pytest command line (rather than via PYTEST_ADDOPTS) shifted that
slice and broke it; set it via PYTEST_ADDOPTS instead.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2026-08-16 16:21:50 -07:00
committed by Khem Raj
parent b96b129d80
commit 1a442c230b
@@ -1,3 +1,6 @@
#!/bin/sh
pytest tests/test_core.py
# test_core.py does `GlancesMain(args_begin_at=2)` at module import time,
# slicing the real process sys.argv; passing --automake on the command line
# (rather than via PYTEST_ADDOPTS) shifts that slice and breaks it.
PYTEST_ADDOPTS="--automake" pytest tests/test_core.py