You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix> using 'installer` module
run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra -m 'not network'==================================================================================== test session starts ====================================================================================platform linux -- Python 3.8.18, pytest-7.4.1, pluggy-1.3.0rootdir: /home/tkloczko/rpmbuild/BUILD/plumbum-1.8.2configfile: pyproject.tomlplugins: timeout-2.1.0, mock-3.11.1timeout: 300.0stimeout method: signaltimeout func_only: Falsecollected 275 itemstests/test_3_cli.py .. [ 0%]tests/test_cli.py ................ [ 6%]tests/test_clicolor.py ...... [ 8%]tests/test_color.py ......... [ 12%]tests/test_config.py ....... [ 14%]tests/test_env.py ...... [ 16%]tests/test_factories.py .................... [ 24%]tests/test_local.py ...........................................................................ss........................ [ 60%]tests/test_nohup.py .... [ 62%]tests/test_putty.py ... [ 63%]tests/test_remote.py sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 89%]tests/test_sudo.py s [ 90%]tests/test_terminal.py .............. [ 95%]tests/test_typed_env.py . [ 95%]tests/test_utils.py s [ 96%]tests/test_validate.py ........ [ 98%]tests/test_visual_color.py ... [100%]===================================================================================== warnings summary ======================================================================================tests/test_local.py::TestLocalMachine::test_redirection /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/commands/base.py:396: ResourceWarning: unclosed file <_io.BufferedRandom name=13> srcproc = self.srccmd.popen(args, **src_kwargs) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_timeout /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=18 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_iter_lines_buffer_size /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5730 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_iter_lines_error /usr/lib/python3.8/site-packages/_pytest/skipping.py:180: ResourceWarning: unclosed file <_io.FileIO name=18 mode='wb' closefd=True> for condition in conditions: Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_iter_lines_error /usr/lib/python3.8/site-packages/_pytest/skipping.py:180: ResourceWarning: unclosed file <_io.FileIO name=19 mode='rb' closefd=True> for condition in conditions: Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_iter_lines_error /usr/lib/python3.8/site-packages/_pytest/skipping.py:180: ResourceWarning: unclosed file <_io.FileIO name=21 mode='rb' closefd=True> for condition in conditions: Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_iter_lines_line_timeout /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5742 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_tee_modifier /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=19 mode='wb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_tee_modifier /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=21 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_tee_modifier /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=26 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_tee_modifiertests/test_local.py::TestLocalMachine::test_run_tf /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=34 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_redirection_stdin_modifiers_fg[modifier0-None]tests/test_local.py::TestLocalMachine::test_redirection_stdin_modifiers_fg[modifier1-True]tests/test_local.py::TestLocalMachine::test_redirection_stdin_modifiers_fg[modifier2-0]tests/test_local.py::TestLocalMachine::test_redirection_stdin_modifiers_fg[modifier3-expected3] /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/commands/base.py:207: ResourceWarning: unclosed file <_io.BufferedRandom name=31> p = self.popen(args, **kwargs) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_logger_pipe /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/commands/modifiers.py:493: ResourceWarning: unclosed file <_io.BufferedWriter name=16> return cmd & self.pipe( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_logger_pipe /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/commands/modifiers.py:493: ResourceWarning: unclosed file <_io.BufferedWriter name=19> return cmd & self.pipe( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_logger_pipe /home/tkloczko/rpmbuild/BUILD/plumbum-1.8.2/tests/test_local.py:682: ResourceWarning: unclosed file <_io.BufferedWriter name=24> ret = bash["-ce", "echo ccc 1>&2; false"] & logger.pipe( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_logger_pipe_line_timeout /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5770 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_session /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5779 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=18 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=20 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=21 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=26 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=29 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_local_daemon /usr/lib/python3.8/site-packages/_pytest/logging.py:376: ResourceWarning: unclosed file <_io.FileIO name=32 mode='rb' closefd=True> self.stream = StringIO() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_run_tf /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=36 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_run_tf /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=37 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_local.py::TestLocalMachine::test_run_tf /home/tkloczko/rpmbuild/BUILDROOT/python-plumbum-1.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages/plumbum/path/base.py:345: ResourceWarning: unclosed file <_io.FileIO name=38 mode='rb' closefd=True> return reduce(operator.or_, [flags[m] for m in mode.lower()], 0) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_nohup.py::TestNohupLocal::test_redir /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5898 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_nohup.py::TestNohupLocal::test_redir /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5904 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_nohup.py::TestNohupLocal::test_redir /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5906 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_putty.py::TestPuttyMachine::test_putty_command[default] /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5910 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_putty.py::TestPuttyMachine::test_putty_command[default] /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5913 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.tests/test_putty.py::TestPuttyMachine::test_putty_command[322] /usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 5908 is still running _warn("subprocess %s is still running" % self.pid, Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html================================================================================== short test summary info ==================================================================================SKIPPED [1] tests/test_local.py:821: Not a TTYSKIPPED [1] tests/test_local.py:832: Not a TTYSKIPPED [1] tests/test_remote.py:57: Skipping; marked with disabled optional tests (skipif, ssh)SKIPPED [1] tests/test_remote.py: Skipping; marked with disabled optional tests (ssh)SKIPPED [1] tests/test_remote.py:76: Skipping; marked with disabled optional tests (xfail, ssh)SKIPPED [40] tests/test_remote.py: Skipping; marked with disabled optional tests (skipif, ssh)SKIPPED [1] tests/test_remote.py:149: Skipping; marked with disabled optional tests (skipif, ssh)SKIPPED [1] tests/test_remote.py:183: Skipping; marked with disabled optional tests (xfail, skipif, ssh)SKIPPED [2] tests/test_remote.py:344: Skipping; marked with disabled optional tests (usefixtures, skipif, ssh)SKIPPED [2] tests/test_remote.py:362: Skipping; marked with disabled optional tests (xfail, skipif, ssh)SKIPPED [18] tests/test_remote.py:382: Skipping; marked with disabled optional tests (ssh, xfail, skipif, parametrize)SKIPPED [2] tests/test_remote.py:467: Skipping; marked with disabled optional tests (ssh, skipif, parametrize)SKIPPED [2] tests/test_remote.py:498: Skipping; marked with disabled optional tests (ssh, skipif, parametrize)SKIPPED [1] tests/test_remote.py:580: Skipping; marked with disabled optional tests (skipif, ssh)SKIPPED [1] tests/test_remote.py:636: Skipping; marked with disabled optional tests (xfail, skipif, ssh)SKIPPED [1] tests/test_sudo.py:13: Skipping; marked with disabled optional tests (sudo, skipif)SKIPPED [1] tests/test_utils.py:8: Skipping; marked with disabled optional tests (skipif, ssh)======================================================================= 198 passed, 77 skipped, 36 warnings in 25.09s =======================================================================
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:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: