Open kloczek opened 1 year ago
@kloczek This is not an issue. Use the -s
flag with pytest.
pytest -s tests/runners.py
Just tested that and ..
What are the platform details?
Linux x86/64. Here is list of modules installed in build env
Looks like pytest with 2.2.0 is OK now
+ /usr/bin/pytest -ra -m 'not network' -s
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/invoke-2.2.0
configfile: pytest.ini
testpaths: tests
plugins: relaxed-2.0.0
collected 979 items
tests/cli.py ......................
tests/collection.py ..........................................................................................
tests/completion.py .........................
tests/concurrency.py ......
tests/config.py ...................................................................................................................
tests/context.py .................................s.s..............................................
tests/executor.py .....................................
tests/init.py ............................
tests/loader.py ..............
tests/merge_dicts.py ............
tests/parser_argument.py ..................s...................
tests/parser_context.py .............................................
tests/parser_parser.py ............................................................
tests/program.py ...........................................................ss..............................................................
tests/runners.py ...........................................s...........................................s...........................................................s........................................
tests/task.py ......s.................................................................
tests/terminals.py ......ss
tests/util.py .......
tests/watchers.py .......
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/context.py:330: Skipped
SKIPPED [1] tests/context.py:350: Skipped
SKIPPED [1] tests/parser_argument.py:95: Skipped
SKIPPED [1] tests/program.py:536: Skipped
SKIPPED [1] tests/program.py:539: Skipped
SKIPPED [1] tests/runners.py:400: Skipped
SKIPPED [1] tests/runners.py:836: Skipped
SKIPPED [1] tests/runners.py:1594: Skipped
SKIPPED [1] tests/task.py:57: Skipped
SKIPPED [1] tests/terminals.py:75: Skipped
SKIPPED [1] tests/terminals.py:78: Skipped
============================================================================== 968 passed, 11 skipped in 7.00s ==============================================================================
without -s
it fails of course so looks like that -s
should be added to default pytest options.
That's great. Lmk if you find out the specific cause and I'll add regression tests.
It look like it was kind of premature confirmation. As long as I'm running pytest in terminal session in which is available pty everything is OK. When I've send the same package to prod builder where packages is build in batch mode without pty pytest fails
FYI in my build procedure I've added those failing units to --deselect list assuming that it si only test suite and not actual; module code issue. In other words I'm assuming that it is it non-critical issue π
Nevertheless thank you for your time so far π π
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Full pytest output is in attachment python-invoke-pytest.txt
Here is list of installed modules in build env