mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-31 03:45:41 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user