>>> py3-pytest-postgresql: Building community/py3-pytest-postgresql 7.0.2-r0 (using abuild 3.15.0-r0) started Mon, 13 Oct 2025 02:37:44 +0000 >>> py3-pytest-postgresql: Validating /home/udu/aports/community/py3-pytest-postgresql/APKBUILD... >>> py3-pytest-postgresql: Analyzing dependencies... >>> py3-pytest-postgresql: Installing for build: build-base py3-pytest py3-port-for py3-psycopg py3-mirakuru postgresql16 py3-setuptools py3-wheel py3-gpep517 py3-pytest-cov py3-pytest-xdist WARNING: opening /home/udu/packages//community: No such file or directory WARNING: opening /home/udu/packages//main: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz (1/48) Installing py3-iniconfig-pyc (2.1.0-r0) (2/48) Installing py3-parsing (3.2.3-r0) (3/48) Installing py3-parsing-pyc (3.2.3-r0) (4/48) Installing py3-packaging (25.0-r0) (5/48) Installing py3-packaging-pyc (25.0-r0) (6/48) Installing py3-pluggy (1.5.0-r0) (7/48) Installing py3-pluggy-pyc (1.5.0-r0) (8/48) Installing py3-py (1.11.0-r4) (9/48) Installing py3-py-pyc (1.11.0-r4) (10/48) Installing py3-pytest-pyc (8.3.5-r0) (11/48) Installing py3-iniconfig (2.1.0-r0) (12/48) Installing py3-pytest (8.3.5-r0) (13/48) Installing py3-port-for (0.7.4-r0) (14/48) Installing py3-port-for-pyc (0.7.4-r0) (15/48) Installing py3-psycopg (3.1.20-r0) (16/48) Installing py3-psycopg-pyc (3.1.20-r0) (17/48) Installing py3-psutil (7.0.0-r0) (18/48) Installing py3-psutil-pyc (7.0.0-r0) (19/48) Installing py3-mirakuru (2.6.1-r0) (20/48) Installing py3-mirakuru-pyc (2.6.1-r0) (21/48) Installing postgresql-common (1.2-r1) Executing postgresql-common-1.2-r1.pre-install (22/48) Installing lz4-libs (1.10.0-r0) (23/48) Installing libpq (17.6-r0) (24/48) Installing postgresql16-client (16.10-r0) (25/48) Installing tzdata (2025b-r0) (26/48) Installing icu-data-en (76.1-r1) Executing icu-data-en-76.1-r1.post-install * * If you need ICU with non-English locales and legacy charset support, install * package icu-data-full. * (27/48) Installing icu-libs (76.1-r1) (28/48) Installing libsasl (2.1.28-r8) (29/48) Installing libldap (2.6.8-r0) (30/48) Installing libxml2 (2.13.9-r0) (31/48) Installing postgresql16 (16.10-r0) Executing postgresql16-16.10-r0.post-install * * If you want to use JIT in PostgreSQL, install postgresql16-jit or * postgresql-jit (if you didn't install specific major version of postgresql). * (32/48) Installing py3-setuptools (80.9.0-r0) (33/48) Installing py3-setuptools-pyc (80.9.0-r0) (34/48) Installing py3-wheel (0.46.1-r0) (35/48) Installing py3-wheel-pyc (0.46.1-r0) (36/48) Installing py3-installer (0.7.0-r2) (37/48) Installing py3-installer-pyc (0.7.0-r2) (38/48) Installing py3-gpep517 (19-r0) (39/48) Installing py3-gpep517-pyc (19-r0) (40/48) Installing py3-coverage (7.8.2-r0) (41/48) Installing py3-coverage-pyc (7.8.2-r0) (42/48) Installing py3-pytest-cov (5.0.0-r0) (43/48) Installing py3-pytest-cov-pyc (5.0.0-r0) (44/48) Installing py3-execnet (2.1.1-r0) (45/48) Installing py3-execnet-pyc (2.1.1-r0) (46/48) Installing py3-pytest-xdist (3.6.1-r0) (47/48) Installing py3-pytest-xdist-pyc (3.6.1-r0) (48/48) Installing .makedepends-py3-pytest-postgresql (20251013.023745) Executing busybox-1.37.0-r19.trigger Executing postgresql-common-1.2-r1.trigger * Setting postgresql16 as the default version * * You are using 'postgresql16'. It's recommended to upgrade to the latest * major version provided by package 'postgresql17'. * Use command 'pg_versions' to switch between versions. * OK: 342 MiB in 137 packages >>> py3-pytest-postgresql: Cleaning up srcdir >>> py3-pytest-postgresql: Cleaning up pkgdir >>> py3-pytest-postgresql: Cleaning up tmpdir >>> py3-pytest-postgresql: Fetching py3-pytest-postgresql-7.0.2.tar.gz::https://github.com/ClearcodeHQ/pytest-postgresql/archive/refs/tags/v7.0.2.tar.gz >>> py3-pytest-postgresql: Fetching py3-pytest-postgresql-7.0.2.tar.gz::https://github.com/ClearcodeHQ/pytest-postgresql/archive/refs/tags/v7.0.2.tar.gz >>> py3-pytest-postgresql: Checking sha512sums... py3-pytest-postgresql-7.0.2.tar.gz: OK parser_set-pgctl-location-to-bin.patch: OK test_do-not-reimport-plugin.patch: OK >>> py3-pytest-postgresql: Unpacking /var/cache/distfiles/py3-pytest-postgresql-7.0.2.tar.gz... >>> py3-pytest-postgresql: parser_set-pgctl-location-to-bin.patch patching file pytest_postgresql/plugin.py Hunk #1 succeeded at 45 (offset 7 lines). >>> py3-pytest-postgresql: test_do-not-reimport-plugin.patch patching file tests/test_postgres_options_plugin.py Hunk #1 succeeded at 19 (offset 5 lines). patching file tests/conftest.py 2025-10-13 02:37:46,845 gpep517 INFO Building wheel via backend setuptools.build_meta /usr/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) /usr/lib/python3.12/site-packages/setuptools/config/expand.py:128: SetuptoolsWarning: File '/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/LICENSE' cannot be found for path in _filter_existing_files(_filepaths) /usr/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! dist._finalize_license_expression() /usr/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() 2025-10-13 02:37:46,870 root INFO running bdist_wheel 2025-10-13 02:37:46,877 root INFO running build 2025-10-13 02:37:46,877 root INFO running build_py 2025-10-13 02:37:46,879 root INFO creating build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/executor.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/janitor.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/retry.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/plugin.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/config.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/exceptions.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,879 root INFO copying pytest_postgresql/executor_noop.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/loader.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/__init__.py -> build/lib/pytest_postgresql 2025-10-13 02:37:46,880 root INFO creating build/lib/pytest_postgresql/factories 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/factories/process.py -> build/lib/pytest_postgresql/factories 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/factories/noprocess.py -> build/lib/pytest_postgresql/factories 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/factories/client.py -> build/lib/pytest_postgresql/factories 2025-10-13 02:37:46,880 root INFO copying pytest_postgresql/factories/__init__.py -> build/lib/pytest_postgresql/factories 2025-10-13 02:37:46,880 root INFO running egg_info 2025-10-13 02:37:46,882 root INFO creating pytest_postgresql.egg-info 2025-10-13 02:37:46,882 root INFO writing pytest_postgresql.egg-info/PKG-INFO 2025-10-13 02:37:46,882 root INFO writing dependency_links to pytest_postgresql.egg-info/dependency_links.txt 2025-10-13 02:37:46,882 root INFO writing entry points to pytest_postgresql.egg-info/entry_points.txt 2025-10-13 02:37:46,882 root INFO writing requirements to pytest_postgresql.egg-info/requires.txt 2025-10-13 02:37:46,882 root INFO writing top-level names to pytest_postgresql.egg-info/top_level.txt 2025-10-13 02:37:46,882 root INFO writing manifest file 'pytest_postgresql.egg-info/SOURCES.txt' 2025-10-13 02:37:46,884 root INFO reading manifest file 'pytest_postgresql.egg-info/SOURCES.txt' 2025-10-13 02:37:46,884 root INFO reading manifest template 'MANIFEST.in' 2025-10-13 02:37:46,885 root WARNING warning: no files found matching '*.py' 2025-10-13 02:37:46,885 root INFO adding license file 'COPYING' 2025-10-13 02:37:46,885 root INFO adding license file 'COPYING.lesser' 2025-10-13 02:37:46,885 root INFO adding license file 'AUTHORS.rst' 2025-10-13 02:37:46,885 root INFO writing manifest file 'pytest_postgresql.egg-info/SOURCES.txt' 2025-10-13 02:37:46,886 root INFO copying pytest_postgresql/py.typed -> build/lib/pytest_postgresql 2025-10-13 02:37:46,889 root INFO installing to build/bdist.linux-x86_64/wheel 2025-10-13 02:37:46,889 root INFO running install 2025-10-13 02:37:46,893 root INFO running install_lib 2025-10-13 02:37:46,895 root INFO creating build/bdist.linux-x86_64/wheel 2025-10-13 02:37:46,895 root INFO creating build/bdist.linux-x86_64/wheel/pytest_postgresql 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/py.typed -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/executor.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,895 root INFO creating build/bdist.linux-x86_64/wheel/pytest_postgresql/factories 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/factories/process.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql/factories 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/factories/noprocess.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql/factories 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/factories/client.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql/factories 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/factories/__init__.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql/factories 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/janitor.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/retry.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/plugin.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,895 root INFO copying build/lib/pytest_postgresql/config.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,896 root INFO copying build/lib/pytest_postgresql/exceptions.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,896 root INFO copying build/lib/pytest_postgresql/executor_noop.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,896 root INFO copying build/lib/pytest_postgresql/loader.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,896 root INFO copying build/lib/pytest_postgresql/__init__.py -> build/bdist.linux-x86_64/wheel/./pytest_postgresql 2025-10-13 02:37:46,896 root INFO running install_egg_info 2025-10-13 02:37:46,897 root INFO Copying pytest_postgresql.egg-info to build/bdist.linux-x86_64/wheel/./pytest_postgresql-7.0.2-py3.12.egg-info 2025-10-13 02:37:46,898 root INFO running install_scripts 2025-10-13 02:37:46,898 root INFO creating build/bdist.linux-x86_64/wheel/pytest_postgresql-7.0.2.dist-info/WHEEL 2025-10-13 02:37:46,898 wheel INFO creating '/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/.dist/.tmp-uozqg99p/pytest_postgresql-7.0.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/__init__.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/config.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/exceptions.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/executor.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/executor_noop.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/janitor.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/loader.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/plugin.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/py.typed' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/retry.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/factories/__init__.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/factories/client.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/factories/noprocess.py' 2025-10-13 02:37:46,899 wheel INFO adding 'pytest_postgresql/factories/process.py' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/licenses/AUTHORS.rst' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/licenses/COPYING' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/licenses/COPYING.lesser' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/METADATA' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/WHEEL' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/entry_points.txt' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/top_level.txt' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/zip-safe' 2025-10-13 02:37:46,900 wheel INFO adding 'pytest_postgresql-7.0.2.dist-info/RECORD' 2025-10-13 02:37:46,900 root INFO removing build/bdist.linux-x86_64/wheel 2025-10-13 02:37:46,901 gpep517 INFO The backend produced .dist/pytest_postgresql-7.0.2-py3-none-any.whl pytest_postgresql-7.0.2-py3-none-any.whl ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 -- /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/.testenv/bin/python3 cachedir: .pytest_cache rootdir: /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2 configfile: pyproject.toml testpaths: tests plugins: postgresql-7.0.2, xdist-3.6.1, cov-5.0.0 collecting ... collected 47 items / 1 deselected / 46 selected tests/test_config.py::test_detect_paths[test.sql-want0] PASSED [ 2%] tests/test_config.py::test_detect_paths[load.function-load.function] PASSED [ 4%] tests/test_config.py::test_detect_paths[path2-want2] PASSED [ 6%] tests/test_executor.py::test_unsupported_version PASSED [ 8%] tests/test_executor.py::test_executor_init_with_password[en_US.UTF-8] FAILED [ 10%] tests/test_executor.py::test_executor_init_with_password[de_DE.UTF-8] FAILED [ 13%] tests/test_executor.py::test_executor_init_with_password[nl_NO.UTF-8] FAILED [ 15%] tests/test_executor.py::test_executor_init_bad_tmp_path Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** FAILED [ 17%] tests/test_executor.py::test_proc_with_password PASSED [ 19%] tests/test_executor.py::test_postgres_options PASSED [ 21%] tests/test_executor.py::test_custom_isolation_level PASSED [ 23%] tests/test_janitor.py::test_version_cast[version0] PASSED [ 26%] tests/test_janitor.py::test_version_cast[10_0] PASSED [ 28%] tests/test_janitor.py::test_version_cast[10_1] PASSED [ 30%] tests/test_janitor.py::test_cursor_selects_postgres_database PASSED [ 32%] tests/test_janitor.py::test_cursor_connects_with_password PASSED [ 34%] tests/test_janitor.py::test_janitor_populate[tests.loader.load_database] PASSED [ 36%] tests/test_janitor.py::test_janitor_populate[tests.loader:load_database] PASSED [ 39%] tests/test_loader.py::test_loader_callables PASSED [ 41%] tests/test_loader.py::test_loader_sql PASSED [ 43%] tests/test_noopexecutor.py::test_noproc_version PASSED [ 45%] tests/test_noopexecutor.py::test_noproc_cached_version FAILED [ 47%] tests/test_postgres_options_plugin.py::test_postgres_options_config_in_cli FAILED [ 50%] tests/test_postgres_options_plugin.py::test_postgres_options_config_in_ini FAILED [ 52%] tests/test_postgres_options_plugin.py::test_postgres_loader_in_cli FAILED [ 54%] tests/test_postgres_options_plugin.py::test_postgres_port_search_count_in_cli_is_int PASSED [ 56%] tests/test_postgres_options_plugin.py::test_postgres_port_search_count_in_ini_is_int PASSED [ 58%] tests/test_postgres_options_plugin.py::test_postgres_drop_test_database PASSED [ 60%] tests/test_postgresql.py::test_postgresql_proc FAILED [ 63%] tests/test_postgresql.py::test_main_postgres ERROR [ 65%] tests/test_postgresql.py::test_two_postgreses ERROR [ 67%] tests/test_postgresql.py::test_postgres_load_two_files PASSED [ 69%] tests/test_postgresql.py::test_rand_postgres_port PASSED [ 71%] tests/test_postgresql.py::test_postgres_terminate_connection[0] PASSED [ 73%] tests/test_postgresql.py::test_postgres_terminate_connection[1] PASSED [ 76%] tests/test_template_database.py::test_template_database[0] PASSED [ 78%] tests/test_template_database.py::test_template_database[1] PASSED [ 80%] tests/test_template_database.py::test_template_database[2] PASSED [ 82%] tests/test_template_database.py::test_template_database[3] PASSED [ 84%] tests/test_template_database.py::test_template_database[4] PASSED [ 86%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 10.18-10.18] PASSED [ 89%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 11.13-11.13] PASSED [ 91%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 12.8-12.8] PASSED [ 93%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 13.4-13.4] PASSED [ 95%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 14.0-14.0] PASSED [ 97%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 16devel-16] PASSED [100%] tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 16devel-16] ERROR [100%]Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ******************************************************************************** Exception while deleting Executor. It is strongly suggested that you use it as a context manager instead. ******************************************************************************** ==================================== ERRORS ==================================== _____________________ ERROR at setup of test_main_postgres _____________________ func = .connect at 0x7c01187736a0> timeout = 60, possible_exception = def retry( func: Callable[[], T], timeout: int = 60, possible_exception: Type[Exception] = Exception, ) -> T: """Attempt to retry the function for timeout time. Most often used for connecting to postgresql database as, especially on macos on github-actions, first few tries fails with this message: ... :: FATAL: the database system is starting up """ time: datetime.datetime = get_current_datetime() timeout_diff: datetime.timedelta = datetime.timedelta(seconds=timeout) i = 0 while True: i += 1 try: > res = func() func = .connect at 0x7c01187736a0> i = 61 possible_exception = time = datetime.datetime(2025, 10, 13, 2, 38, 18, 76096, tzinfo=datetime.timezone.utc) timeout = 60 timeout_diff = datetime.timedelta(seconds=60) pytest_postgresql/retry.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pytest_postgresql/janitor.py:134: in connect return psycopg.connect( dbname = 'postgres' self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'dbname=postgres user=postgres host=127.0.0.1 port=24914 hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': 'postgres', 'host': '127.0.0.1', 'password': None, 'port': 24914, ...} params = {'dbname': 'postgres', 'host': '127.0.0.1', 'port': 24914, 'user': 'postgres'} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 24914 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? attempt = {'dbname': 'postgres', 'host': '127.0.0.1', 'hostaddr': '127.0.0.1', 'port': 24914, 'user': 'postgres'} attempts = [{'dbname': 'postgres', 'host': '127.0.0.1', 'hostaddr': '127.0.0.1', 'port': 24914, 'user': 'postgres'}] autocommit = False cls = conninfo = 'dbname=postgres user=postgres host=127.0.0.1 port=24914 hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': 'postgres', 'host': '127.0.0.1', 'password': None, 'port': 24914, 'user': 'postgres'} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 24914 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?') params = {'dbname': 'postgres', 'host': '127.0.0.1', 'port': 24914, 'user': 'postgres'} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError The above exception was the direct cause of the following exception: request = > @pytest.fixture def postgresql_factory(request: FixtureRequest) -> Iterator[Connection]: """Fixture factory for PostgreSQL. :param request: fixture request object :returns: postgresql client """ proc_fixture: Union[PostgreSQLExecutor, NoopExecutor] = request.getfixturevalue( process_fixture_name ) config = get_config(request) pg_host = proc_fixture.host pg_port = proc_fixture.port pg_user = proc_fixture.user pg_password = proc_fixture.password pg_options = proc_fixture.options pg_db = dbname or proc_fixture.dbname janitor = DatabaseJanitor( user=pg_user, host=pg_host, port=pg_port, dbname=pg_db, template_dbname=proc_fixture.template_dbname, version=proc_fixture.version, password=pg_password, isolation_level=isolation_level, ) if config["drop_test_database"]: janitor.drop() > with janitor: config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} dbname = None isolation_level = None janitor = pg_db = 'tests' pg_host = '127.0.0.1' pg_options = '' pg_password = None pg_port = 24914 pg_user = 'postgres' proc_fixture = process_fixture_name = 'postgresql_proc' request = > pytest_postgresql/factories/client.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pytest_postgresql/janitor.py:157: in __enter__ self.init() self = pytest_postgresql/janitor.py:68: in init with self.cursor() as cur: self = /usr/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) self = pytest_postgresql/janitor.py:142: in cursor conn = retry( connect = .connect at 0x7c01187736a0> dbname = 'postgres' self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = .connect at 0x7c01187736a0> timeout = 60, possible_exception = def retry( func: Callable[[], T], timeout: int = 60, possible_exception: Type[Exception] = Exception, ) -> T: """Attempt to retry the function for timeout time. Most often used for connecting to postgresql database as, especially on macos on github-actions, first few tries fails with this message: ... :: FATAL: the database system is starting up """ time: datetime.datetime = get_current_datetime() timeout_diff: datetime.timedelta = datetime.timedelta(seconds=timeout) i = 0 while True: i += 1 try: res = func() return res except possible_exception as e: if time + timeout_diff < get_current_datetime(): > raise TimeoutError(f"Failed after {i} attempts") from e E TimeoutError: Failed after 61 attempts func = .connect at 0x7c01187736a0> i = 61 possible_exception = time = datetime.datetime(2025, 10, 13, 2, 38, 18, 76096, tzinfo=datetime.timezone.utc) timeout = 60 timeout_diff = datetime.timedelta(seconds=60) pytest_postgresql/retry.py:35: TimeoutError ____________________ ERROR at setup of test_two_postgreses _____________________ func = .connect at 0x7c0118773420> timeout = 60, possible_exception = def retry( func: Callable[[], T], timeout: int = 60, possible_exception: Type[Exception] = Exception, ) -> T: """Attempt to retry the function for timeout time. Most often used for connecting to postgresql database as, especially on macos on github-actions, first few tries fails with this message: ... :: FATAL: the database system is starting up """ time: datetime.datetime = get_current_datetime() timeout_diff: datetime.timedelta = datetime.timedelta(seconds=timeout) i = 0 while True: i += 1 try: > res = func() func = .connect at 0x7c0118773420> i = 61 possible_exception = time = datetime.datetime(2025, 10, 13, 2, 39, 18, 160500, tzinfo=datetime.timezone.utc) timeout = 60 timeout_diff = datetime.timedelta(seconds=60) pytest_postgresql/retry.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pytest_postgresql/janitor.py:134: in connect return psycopg.connect( dbname = 'postgres' self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = conninfo = 'dbname=postgres user=postgres host=127.0.0.1 port=24914 hostaddr=127.0.0.1' autocommit = False, prepare_threshold = 5, row_factory = None cursor_factory = None, context = None kwargs = {'dbname': 'postgres', 'host': '127.0.0.1', 'password': None, 'port': 24914, ...} params = {'dbname': 'postgres', 'host': '127.0.0.1', 'port': 24914, 'user': 'postgres'} timeout = 130 @classmethod # type: ignore[misc] # https://github.com/python/mypy/issues/11004 def connect( cls, conninfo: str = "", *, autocommit: bool = False, prepare_threshold: Optional[int] = 5, row_factory: Optional[RowFactory[Row]] = None, cursor_factory: Optional[Type[Cursor[Row]]] = None, context: Optional[AdaptContext] = None, **kwargs: Any, ) -> Self: """ Connect to a database server and return a new `Connection` instance. """ params = cls._get_connection_params(conninfo, **kwargs) timeout = timeout_from_conninfo(params) rv = None attempts = conninfo_attempts(params) for attempt in attempts: try: conninfo = make_conninfo(**attempt) rv = cls._wait_conn(cls._connect_gen(conninfo), timeout=timeout) break except e._NO_TRACEBACK as ex: if len(attempts) > 1: logger.debug( "connection attempt failed on host: %r, port: %r," " hostaddr: %r: %s", attempt.get("host"), attempt.get("port"), attempt.get("hostaddr"), str(ex), ) last_ex = ex if not rv: assert last_ex > raise last_ex.with_traceback(None) E psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 24914 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? attempt = {'dbname': 'postgres', 'host': '127.0.0.1', 'hostaddr': '127.0.0.1', 'port': 24914, 'user': 'postgres'} attempts = [{'dbname': 'postgres', 'host': '127.0.0.1', 'hostaddr': '127.0.0.1', 'port': 24914, 'user': 'postgres'}] autocommit = False cls = conninfo = 'dbname=postgres user=postgres host=127.0.0.1 port=24914 hostaddr=127.0.0.1' context = None cursor_factory = None kwargs = {'dbname': 'postgres', 'host': '127.0.0.1', 'password': None, 'port': 24914, 'user': 'postgres'} last_ex = OperationalError('connection failed: connection to server at "127.0.0.1", port 24914 failed: Connection refused\n\tIs the server running on that host and accepting TCP/IP connections?') params = {'dbname': 'postgres', 'host': '127.0.0.1', 'port': 24914, 'user': 'postgres'} prepare_threshold = 5 row_factory = None rv = None timeout = 130 /usr/lib/python3.12/site-packages/psycopg/connection.py:754: OperationalError The above exception was the direct cause of the following exception: request = > @pytest.fixture def postgresql_factory(request: FixtureRequest) -> Iterator[Connection]: """Fixture factory for PostgreSQL. :param request: fixture request object :returns: postgresql client """ proc_fixture: Union[PostgreSQLExecutor, NoopExecutor] = request.getfixturevalue( process_fixture_name ) config = get_config(request) pg_host = proc_fixture.host pg_port = proc_fixture.port pg_user = proc_fixture.user pg_password = proc_fixture.password pg_options = proc_fixture.options pg_db = dbname or proc_fixture.dbname janitor = DatabaseJanitor( user=pg_user, host=pg_host, port=pg_port, dbname=pg_db, template_dbname=proc_fixture.template_dbname, version=proc_fixture.version, password=pg_password, isolation_level=isolation_level, ) if config["drop_test_database"]: janitor.drop() > with janitor: config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} dbname = None isolation_level = None janitor = pg_db = 'tests' pg_host = '127.0.0.1' pg_options = '' pg_password = None pg_port = 24914 pg_user = 'postgres' proc_fixture = process_fixture_name = 'postgresql_proc' request = > pytest_postgresql/factories/client.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pytest_postgresql/janitor.py:157: in __enter__ self.init() self = pytest_postgresql/janitor.py:68: in init with self.cursor() as cur: self = /usr/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) self = pytest_postgresql/janitor.py:142: in cursor conn = retry( connect = .connect at 0x7c0118773420> dbname = 'postgres' self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = .connect at 0x7c0118773420> timeout = 60, possible_exception = def retry( func: Callable[[], T], timeout: int = 60, possible_exception: Type[Exception] = Exception, ) -> T: """Attempt to retry the function for timeout time. Most often used for connecting to postgresql database as, especially on macos on github-actions, first few tries fails with this message: ... :: FATAL: the database system is starting up """ time: datetime.datetime = get_current_datetime() timeout_diff: datetime.timedelta = datetime.timedelta(seconds=timeout) i = 0 while True: i += 1 try: res = func() return res except possible_exception as e: if time + timeout_diff < get_current_datetime(): > raise TimeoutError(f"Failed after {i} attempts") from e E TimeoutError: Failed after 61 attempts func = .connect at 0x7c0118773420> i = 61 possible_exception = time = datetime.datetime(2025, 10, 13, 2, 39, 18, 160500, tzinfo=datetime.timezone.utc) timeout = 60 timeout_diff = datetime.timedelta(seconds=60) pytest_postgresql/retry.py:35: TimeoutError ______ ERROR at teardown of test_versions[pg_ctl (PostgreSQL) 16devel-16] ______ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341, in from_call | result: TResult | None = func() | ^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 242, in | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall | raise exception.with_traceback(exception.__traceback__) | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 97, in pytest_runtest_teardown | yield from thread_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 100, in pytest_runtest_teardown | yield from unraisable_exception_runtest_hook() | File "/usr/lib/python3.12/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 853, in pytest_runtest_teardown | yield from self._runtest_for(item, "teardown") | File "/usr/lib/python3.12/site-packages/_pytest/logging.py", line 829, in _runtest_for | yield | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/capture.py", line 903, in pytest_runtest_teardown | return (yield) | ^^^^^ | File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall | res = hook_impl.function(*args) | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 189, in pytest_runtest_teardown | item.session._setupstate.teardown_exact(nextitem) | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 557, in teardown_exact | raise exceptions[0] | ExceptionGroup: errors while tearing down testsfailed=11 testscollected=46> (6 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 229, in stop | super().stop(sig, exp_sig) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 358, in stop | self._kill_all_kids(stop_signal) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids | pids = processes_with_env(ENV_UUID, self._uuid) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil | for proc in psutil.process_iter(): | ^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter | a = set(pids()) | ^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids | _LOWEST_PID = ret[0] | ~~~^^^ | IndexError: list index out of range +---------------- 2 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 229, in stop | super().stop(sig, exp_sig) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 358, in stop | self._kill_all_kids(stop_signal) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids | pids = processes_with_env(ENV_UUID, self._uuid) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil | for proc in psutil.process_iter(): | ^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter | a = set(pids()) | ^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids | _LOWEST_PID = ret[0] | ~~~^^^ | IndexError: list index out of range +---------------- 3 ---------------- | Traceback (most recent call last): | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/retry.py", line 31, in retry | res = func() | ^^^^^^ | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/janitor.py", line 134, in connect | return psycopg.connect( | ^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psycopg/connection.py", line 754, in connect | raise last_ex.with_traceback(None) | psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 24914 failed: Connection refused | Is the server running on that host and accepting TCP/IP connections? | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 175, in postgresql_proc_fixture | with DatabaseJanitor( | ^^^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/janitor.py", line 167, in __exit__ | self.drop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/janitor.py", line 89, in drop | with self.cursor() as cur: | ^^^^^^^^^^^^^ | File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__ | return next(self.gen) | ^^^^^^^^^^^^^^ | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/janitor.py", line 142, in cursor | conn = retry( | ^^^^^^ | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/retry.py", line 35, in retry | raise TimeoutError(f"Failed after {i} attempts") from e | TimeoutError: Failed after 61 attempts | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 224, in stop | subprocess.check_output( | File "/usr/lib/python3.12/subprocess.py", line 466, in check_output | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/subprocess.py", line 571, in run | raise CalledProcessError(retcode, process.args, | subprocess.CalledProcessError: Command '/usr/bin/pg_ctl stop -D "/tmp/pytest-of-udu/pytest-0/pytest-postgresql-postgresql_proc0/data-24914" -m f' returned non-zero exit status 1. +---------------- 4 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 229, in stop | super().stop(sig, exp_sig) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 358, in stop | self._kill_all_kids(stop_signal) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids | pids = processes_with_env(ENV_UUID, self._uuid) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil | for proc in psutil.process_iter(): | ^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter | a = set(pids()) | ^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids | _LOWEST_PID = ret[0] | ~~~^^^ | IndexError: list index out of range +---------------- 5 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 229, in stop | super().stop(sig, exp_sig) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 358, in stop | self._kill_all_kids(stop_signal) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids | pids = processes_with_env(ENV_UUID, self._uuid) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil | for proc in psutil.process_iter(): | ^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter | a = set(pids()) | ^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids | _LOWEST_PID = ret[0] | ~~~^^^ | IndexError: list index out of range +---------------- 6 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 546, in teardown_exact | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1032, in finish | raise exceptions[0] | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 1021, in finish | fin() | File "/usr/lib/python3.12/site-packages/_pytest/fixtures.py", line 907, in _teardown_yield_fixture | next(it) | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py", line 173, in postgresql_proc_fixture | with postgresql_executor: | ^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 189, in __exit__ | self.stop() | File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 229, in stop | super().stop(sig, exp_sig) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 358, in stop | self._kill_all_kids(stop_signal) | File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids | pids = processes_with_env(ENV_UUID, self._uuid) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil | for proc in psutil.process_iter(): | ^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter | a = set(pids()) | ^^^^^^ | File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids | _LOWEST_PID = ret[0] | ~~~^^^ | IndexError: list index out of range +------------------------------------ --------------------------- Captured stderr teardown --------------------------- pg_ctl: PID file "/tmp/pytest-of-udu/pytest-0/pytest-postgresql-postgresql_proc0/data-24914/postmaster.pid" does not exist Is server running? =================================== FAILURES =================================== ________________ test_executor_init_with_password[en_US.UTF-8] _________________ request = > monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c01190c1400> tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') locale = 'en_US.UTF-8' @pytest.mark.parametrize("locale", ("en_US.UTF-8", "de_DE.UTF-8", "nl_NO.UTF-8")) def test_executor_init_with_password( request: FixtureRequest, monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.TempPathFactory, locale: str, ) -> None: """Test whether the executor initializes properly.""" config = get_config(request) monkeypatch.setenv("LC_ALL", locale) pg_exe = process._pg_exe(None, config) port = process._pg_port(-1, config, []) tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.node.name}") datadir, logfile_path = process._prepare_dir(tmpdir, port) executor = PostgreSQLExecutor( executable=pg_exe, host=config["host"], port=port, datadir=str(datadir), unixsocketdir=config["unixsocketdir"], logfile=str(logfile_path), startparams=config["startparams"], password="somepassword", dbname="somedatabase", ) > assert_executor_start_stop(executor) config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} datadir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[en_US.UTF-8]0/data-17349') executor = locale = 'en_US.UTF-8' logfile_path = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[en_US.UTF-8]0/postgresql.17349.log') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c01190c1400> pg_exe = '/usr/bin/pg_ctl' port = 17349 request = > tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') tmpdir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[en_US.UTF-8]0') tests/test_executor.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_executor.py:22: in assert_executor_start_stop with executor: executor = /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() exc_type = None exc_value = None self = traceback = None pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) __class__ = exp_sig = None self = sig = None /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) expected_returncode = None process_stopped = .process_stopped at 0x7c0119110860> self = stop_signal = /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) self = sig = /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): env_name = 'mirakuru_uuid' env_value = '1226882:560a657c-54a2-4e3c-8bad-28a65d46f0bf' pids = set() /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) ad_value = None add = .add at 0x7c0119110400> attrs = None pmap = {} remove = .remove at 0x7c0119110900> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range ret = [] /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ----------------------------- Captured stderr call ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory ________________ test_executor_init_with_password[de_DE.UTF-8] _________________ request = > monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c011911edb0> tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') locale = 'de_DE.UTF-8' @pytest.mark.parametrize("locale", ("en_US.UTF-8", "de_DE.UTF-8", "nl_NO.UTF-8")) def test_executor_init_with_password( request: FixtureRequest, monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.TempPathFactory, locale: str, ) -> None: """Test whether the executor initializes properly.""" config = get_config(request) monkeypatch.setenv("LC_ALL", locale) pg_exe = process._pg_exe(None, config) port = process._pg_port(-1, config, []) tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.node.name}") datadir, logfile_path = process._prepare_dir(tmpdir, port) executor = PostgreSQLExecutor( executable=pg_exe, host=config["host"], port=port, datadir=str(datadir), unixsocketdir=config["unixsocketdir"], logfile=str(logfile_path), startparams=config["startparams"], password="somepassword", dbname="somedatabase", ) > assert_executor_start_stop(executor) config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} datadir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[de_DE.UTF-8]0/data-31256') executor = locale = 'de_DE.UTF-8' logfile_path = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[de_DE.UTF-8]0/postgresql.31256.log') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c011911edb0> pg_exe = '/usr/bin/pg_ctl' port = 31256 request = > tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') tmpdir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[de_DE.UTF-8]0') tests/test_executor.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_executor.py:22: in assert_executor_start_stop with executor: executor = /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() exc_type = None exc_value = None self = traceback = None pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) __class__ = exp_sig = None self = sig = None /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) expected_returncode = None process_stopped = .process_stopped at 0x7c0119111800> self = stop_signal = /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) self = sig = /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): env_name = 'mirakuru_uuid' env_value = '1226882:0c460321-3813-465f-928c-5d56b593edc7' pids = set() /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) ad_value = None add = .add at 0x7c0119111080> attrs = None pmap = {} remove = .remove at 0x7c01191111c0> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range ret = [] /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ----------------------------- Captured stderr call ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory ________________ test_executor_init_with_password[nl_NO.UTF-8] _________________ request = > monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c011911f7a0> tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') locale = 'nl_NO.UTF-8' @pytest.mark.parametrize("locale", ("en_US.UTF-8", "de_DE.UTF-8", "nl_NO.UTF-8")) def test_executor_init_with_password( request: FixtureRequest, monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.TempPathFactory, locale: str, ) -> None: """Test whether the executor initializes properly.""" config = get_config(request) monkeypatch.setenv("LC_ALL", locale) pg_exe = process._pg_exe(None, config) port = process._pg_port(-1, config, []) tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.node.name}") datadir, logfile_path = process._prepare_dir(tmpdir, port) executor = PostgreSQLExecutor( executable=pg_exe, host=config["host"], port=port, datadir=str(datadir), unixsocketdir=config["unixsocketdir"], logfile=str(logfile_path), startparams=config["startparams"], password="somepassword", dbname="somedatabase", ) > assert_executor_start_stop(executor) config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} datadir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[nl_NO.UTF-8]0/data-21534') executor = locale = 'nl_NO.UTF-8' logfile_path = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[nl_NO.UTF-8]0/postgresql.21534.log') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7c011911f7a0> pg_exe = '/usr/bin/pg_ctl' port = 21534 request = > tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') tmpdir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_with_password[nl_NO.UTF-8]0') tests/test_executor.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_executor.py:22: in assert_executor_start_stop with executor: executor = /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() exc_type = None exc_value = None self = traceback = None pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) __class__ = exp_sig = None self = sig = None /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) expected_returncode = None process_stopped = .process_stopped at 0x7c0119112200> self = stop_signal = /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) self = sig = /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): env_name = 'mirakuru_uuid' env_value = '1226882:fbd5b1ac-179f-4a97-9023-fc4d4a7134cf' pids = set() /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) ad_value = None add = .add at 0x7c0119111760> attrs = None pmap = {} remove = .remove at 0x7c0119111d00> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range ret = [] /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ----------------------------- Captured stderr call ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory _______________________ test_executor_init_bad_tmp_path ________________________ request = > tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') def test_executor_init_bad_tmp_path( request: FixtureRequest, tmp_path_factory: pytest.TempPathFactory, ) -> None: r"""Test init with \ and space chars in the path.""" config = get_config(request) pg_exe = process._pg_exe(None, config) port = process._pg_port(-1, config, []) tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.node.name}") / r"a bad\path/" tmpdir.mkdir(exist_ok=True) datadir, logfile_path = process._prepare_dir(tmpdir, port) executor = PostgreSQLExecutor( executable=pg_exe, host=config["host"], port=port, datadir=str(datadir), unixsocketdir=config["unixsocketdir"], logfile=str(logfile_path), startparams=config["startparams"], password="some password", dbname="some database", ) > assert_executor_start_stop(executor) config = {'dbname': 'tests', 'drop_test_database': False, 'exec': '/usr/bin/pg_ctl', 'host': '127.0.0.1', 'load': [], 'options': '', 'password': None, 'port': None, 'port_search_count': 5, 'postgres_options': '', 'startparams': '-w', 'unixsocketdir': '/tmp', 'user': 'postgres'} datadir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_bad_tmp_path0/a bad\\path/data-12049') executor = logfile_path = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_bad_tmp_path0/a bad\\path/postgresql.12049.log') pg_exe = '/usr/bin/pg_ctl' port = 12049 request = > tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0'), _retention_count=3, _retention_policy='all') tmpdir = PosixPath('/tmp/pytest-of-udu/pytest-0/pytest-postgresql-test_executor_init_bad_tmp_path0/a bad\\path') tests/test_executor.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_executor.py:22: in assert_executor_start_stop with executor: executor = /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() exc_type = None exc_value = None self = traceback = None pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) __class__ = exp_sig = None self = sig = None /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) expected_returncode = None process_stopped = .process_stopped at 0x7c0119112ac0> self = stop_signal = /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) self = sig = /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): env_name = 'mirakuru_uuid' env_value = '1226882:2cd894f8-e6db-4bb8-9772-a6b09adfe813' pids = set() /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) ad_value = None add = .add at 0x7c0119112d40> attrs = None pmap = {} remove = .remove at 0x7c0119112020> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range ret = [] /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ----------------------------- Captured stderr call ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory __________________________ test_noproc_cached_version __________________________ postgresql_proc = def test_noproc_cached_version(postgresql_proc: PostgreSQLExecutor) -> None: """Test that the version is being cached.""" postgresql_noproc = NoopExecutor( postgresql_proc.host, postgresql_proc.port, postgresql_proc.user, postgresql_proc.options, postgresql_proc.dbname, ) ver = retry( lambda: postgresql_noproc.version, possible_exception=psycopg.OperationalError, ) > with postgresql_proc.stopped(): postgresql_noproc = postgresql_proc = ver = tests/test_noopexecutor.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/contextlib.py:137: in __enter__ return next(self.gen) self = /usr/lib/python3.12/site-packages/mirakuru/base.py:385: in stopped self.stop() self = pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) __class__ = exp_sig = None self = sig = None /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) expected_returncode = None process_stopped = .process_stopped at 0x7c0119113a60> self = stop_signal = /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) self = sig = /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): env_name = 'mirakuru_uuid' env_value = '1226882:04b827d7-abf1-48e7-80da-60dd9ae4314b' pids = set() /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) ad_value = None add = .add at 0x7c01191136a0> attrs = None pmap = {} remove = .remove at 0x7c0119113b00> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range ret = [] /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError _____________________ test_postgres_options_config_in_cli ______________________ pointed_pytester = def test_postgres_options_config_in_cli(pointed_pytester: Pytester) -> None: """Check that command line arguments are honored.""" pointed_pytester.copy_example("test_postgres_options.py") ret = pointed_pytester.runpytest( "--postgresql-postgres-options", "-N 16", "test_postgres_options.py" ) > ret.assert_outcomes(passed=1) E AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} E E Common items: E {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} E Differing items: E {'errors': 1} != {'errors': 0} E E Full diff: E { E - 'errors': 0, E ? ^ E + 'errors': 1, E ? ^ E 'failed': 0, E 'passed': 1, E 'skipped': 0, E 'xfailed': 0, E 'xpassed': 0, E } pointed_pytester = ret = /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/tests/test_postgres_options_plugin.py:31: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 rootdir: /tmp/pytest-of-udu/pytest-0/test_postgres_options_config_in_cli0 plugins: postgresql-7.0.2, xdist-3.6.1, cov-5.0.0 collected 1 item test_postgres_options.py .E [100%] ==================================== ERRORS ==================================== __________________ ERROR at teardown of test_postgres_options __________________ request = > tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _retention_count=3, _retention_policy='all') @pytest.fixture(scope="session") def postgresql_proc_fixture( request: FixtureRequest, tmp_path_factory: TempPathFactory ) -> Iterator[PostgreSQLExecutor]: """Process fixture for PostgreSQL. :param request: fixture request object :param tmp_path_factory: temporary path object (fixture) :returns: tcp executor """ config = get_config(request) pg_dbname = dbname or config["dbname"] pg_load = load or config["load"] postgresql_ctl = _pg_exe(executable, config) port_path = tmp_path_factory.getbasetemp() if hasattr(request.config, "workerinput"): port_path = tmp_path_factory.getbasetemp().parent n = 0 used_ports: set[int] = set() while True: try: pg_port = _pg_port(port, config, used_ports) port_filename_path = port_path / f"postgresql-{pg_port}.port" if pg_port in used_ports: raise PortForException( f"Port {pg_port} already in use, probably by other instances of the test. " f"{port_filename_path} is already used." ) used_ports.add(pg_port) with (port_filename_path).open("x") as port_file: port_file.write(f"pg_port {pg_port}\n") break except FileExistsError: if n >= config["port_search_count"]: raise PortForException( f"Attempted {n} times to select ports. " f"All attempted ports: {', '.join(map(str, used_ports))} are already " f"in use, probably by other instances of the test." ) n += 1 tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.fixturename}") datadir, logfile_path = _prepare_dir(tmpdir, str(pg_port)) postgresql_executor = PostgreSQLExecutor( executable=postgresql_ctl, host=host or config["host"], port=pg_port, user=user or config["user"], password=password or config["password"], dbname=pg_dbname, options=options or config["options"], datadir=str(datadir), unixsocketdir=unixsocketdir or config["unixsocketdir"], logfile=str(logfile_path), startparams=startparams or config["startparams"], postgres_options=postgres_options or config["postgres_options"], ) # start server > with postgresql_executor: /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ---------------------------- Captured stderr setup ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory =========================== short test summary info ============================ ERROR test_postgres_options.py::test_postgres_options - IndexError: list inde... ========================== 1 passed, 1 error in 1.88s ========================== _____________________ test_postgres_options_config_in_ini ______________________ pointed_pytester = def test_postgres_options_config_in_ini(pointed_pytester: Pytester) -> None: """Check that pytest.ini arguments are honored.""" pointed_pytester.copy_example("test_postgres_options.py") pointed_pytester.makefile(".ini", pytest="[pytest]\npostgresql_postgres_options = -N 16\n") ret = pointed_pytester.runpytest("test_postgres_options.py") > ret.assert_outcomes(passed=1) E AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} E E Common items: E {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} E Differing items: E {'errors': 1} != {'errors': 0} E E Full diff: E { E - 'errors': 0, E ? ^ E + 'errors': 1, E ? ^ E 'failed': 0, E 'passed': 1, E 'skipped': 0, E 'xfailed': 0, E 'xpassed': 0, E } pointed_pytester = ret = /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/tests/test_postgres_options_plugin.py:39: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 rootdir: /tmp/pytest-of-udu/pytest-0/test_postgres_options_config_in_ini0 configfile: pytest.ini plugins: postgresql-7.0.2, xdist-3.6.1, cov-5.0.0 collected 1 item test_postgres_options.py .E [100%] ==================================== ERRORS ==================================== __________________ ERROR at teardown of test_postgres_options __________________ request = > tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _retention_count=3, _retention_policy='all') @pytest.fixture(scope="session") def postgresql_proc_fixture( request: FixtureRequest, tmp_path_factory: TempPathFactory ) -> Iterator[PostgreSQLExecutor]: """Process fixture for PostgreSQL. :param request: fixture request object :param tmp_path_factory: temporary path object (fixture) :returns: tcp executor """ config = get_config(request) pg_dbname = dbname or config["dbname"] pg_load = load or config["load"] postgresql_ctl = _pg_exe(executable, config) port_path = tmp_path_factory.getbasetemp() if hasattr(request.config, "workerinput"): port_path = tmp_path_factory.getbasetemp().parent n = 0 used_ports: set[int] = set() while True: try: pg_port = _pg_port(port, config, used_ports) port_filename_path = port_path / f"postgresql-{pg_port}.port" if pg_port in used_ports: raise PortForException( f"Port {pg_port} already in use, probably by other instances of the test. " f"{port_filename_path} is already used." ) used_ports.add(pg_port) with (port_filename_path).open("x") as port_file: port_file.write(f"pg_port {pg_port}\n") break except FileExistsError: if n >= config["port_search_count"]: raise PortForException( f"Attempted {n} times to select ports. " f"All attempted ports: {', '.join(map(str, used_ports))} are already " f"in use, probably by other instances of the test." ) n += 1 tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.fixturename}") datadir, logfile_path = _prepare_dir(tmpdir, str(pg_port)) postgresql_executor = PostgreSQLExecutor( executable=postgresql_ctl, host=host or config["host"], port=pg_port, user=user or config["user"], password=password or config["password"], dbname=pg_dbname, options=options or config["options"], datadir=str(datadir), unixsocketdir=unixsocketdir or config["unixsocketdir"], logfile=str(logfile_path), startparams=startparams or config["startparams"], postgres_options=postgres_options or config["postgres_options"], ) # start server > with postgresql_executor: /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ---------------------------- Captured stderr setup ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory =========================== short test summary info ============================ ERROR test_postgres_options.py::test_postgres_options - IndexError: list inde... ========================== 1 passed, 1 error in 1.63s ========================== _________________________ test_postgres_loader_in_cli __________________________ pointed_pytester = def test_postgres_loader_in_cli(pointed_pytester: Pytester) -> None: """Check that command line arguments are honored.""" pointed_pytester.copy_example("test_load.py") test_sql_path = pointed_pytester.copy_example("test.sql") ret = pointed_pytester.runpytest(f"--postgresql-load={test_sql_path}", "test_load.py") > ret.assert_outcomes(passed=1) E AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} E E Common items: E {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} E Differing items: E {'errors': 1} != {'errors': 0} E E Full diff: E { E - 'errors': 0, E ? ^ E + 'errors': 1, E ? ^ E 'failed': 0, E 'passed': 1, E 'skipped': 0, E 'xfailed': 0, E 'xpassed': 0, E } pointed_pytester = ret = test_sql_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_postgres_loader_in_cli0/test.sql') /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/tests/test_postgres_options_plugin.py:47: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 rootdir: /tmp/pytest-of-udu/pytest-0/test_postgres_loader_in_cli0 plugins: postgresql-7.0.2, xdist-3.6.1, cov-5.0.0 collected 1 item test_load.py .E [100%] ==================================== ERRORS ==================================== _______________ ERROR at teardown of test_postgres_load_one_file _______________ request = > tmp_path_factory = TempPathFactory(_given_basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _trace=, _basetemp=PosixPath('/tmp/pytest-of-udu/pytest-0/basetemp'), _retention_count=3, _retention_policy='all') @pytest.fixture(scope="session") def postgresql_proc_fixture( request: FixtureRequest, tmp_path_factory: TempPathFactory ) -> Iterator[PostgreSQLExecutor]: """Process fixture for PostgreSQL. :param request: fixture request object :param tmp_path_factory: temporary path object (fixture) :returns: tcp executor """ config = get_config(request) pg_dbname = dbname or config["dbname"] pg_load = load or config["load"] postgresql_ctl = _pg_exe(executable, config) port_path = tmp_path_factory.getbasetemp() if hasattr(request.config, "workerinput"): port_path = tmp_path_factory.getbasetemp().parent n = 0 used_ports: set[int] = set() while True: try: pg_port = _pg_port(port, config, used_ports) port_filename_path = port_path / f"postgresql-{pg_port}.port" if pg_port in used_ports: raise PortForException( f"Port {pg_port} already in use, probably by other instances of the test. " f"{port_filename_path} is already used." ) used_ports.add(pg_port) with (port_filename_path).open("x") as port_file: port_file.write(f"pg_port {pg_port}\n") break except FileExistsError: if n >= config["port_search_count"]: raise PortForException( f"Attempted {n} times to select ports. " f"All attempted ports: {', '.join(map(str, used_ports))} are already " f"in use, probably by other instances of the test." ) n += 1 tmpdir = tmp_path_factory.mktemp(f"pytest-postgresql-{request.fixturename}") datadir, logfile_path = _prepare_dir(tmpdir, str(pg_port)) postgresql_executor = PostgreSQLExecutor( executable=postgresql_ctl, host=host or config["host"], port=pg_port, user=user or config["user"], password=password or config["password"], dbname=pg_dbname, options=options or config["options"], datadir=str(datadir), unixsocketdir=unixsocketdir or config["unixsocketdir"], logfile=str(logfile_path), startparams=startparams or config["startparams"], postgres_options=postgres_options or config["postgres_options"], ) # start server > with postgresql_executor: /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/factories/process.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/mirakuru/base.py:189: in __exit__ self.stop() /home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py:229: in stop super().stop(sig, exp_sig) /usr/lib/python3.12/site-packages/mirakuru/base.py:358: in stop self._kill_all_kids(stop_signal) /usr/lib/python3.12/site-packages/mirakuru/base.py:294: in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) /usr/lib/python3.12/site-packages/mirakuru/base_env.py:52: in processes_with_env_psutil for proc in psutil.process_iter(): /usr/lib/python3.12/site-packages/psutil/__init__.py:1510: in process_iter a = set(pids()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def pids(): """Return a list of current running PIDs.""" global _LOWEST_PID ret = sorted(_psplatform.pids()) > _LOWEST_PID = ret[0] E IndexError: list index out of range /usr/lib/python3.12/site-packages/psutil/__init__.py:1455: IndexError ---------------------------- Captured stderr setup ----------------------------- sysctl: can't change directory to '/proc/sys': No such file or directory =========================== short test summary info ============================ ERROR test_load.py::test_postgres_load_one_file - IndexError: list index out ... ========================== 1 passed, 1 error in 1.85s ========================== _____________________________ test_postgresql_proc _____________________________ postgresql_proc = def test_postgresql_proc(postgresql_proc: PostgreSQLExecutor) -> None: """Test different postgresql versions.""" > assert postgresql_proc.running() is True E assert False is True E + where False = running() E + where running = .running postgresql_proc = tests/test_postgresql.py:19: AssertionError ---------- coverage: platform linux, python 3.12.11-final-0 ---------- Name Stmts Miss Cover -------------------------------------------------------------- pytest_postgresql/__init__.py 1 1 0% pytest_postgresql/config.py 33 20 39% pytest_postgresql/exceptions.py 2 2 0% pytest_postgresql/executor.py 98 41 58% pytest_postgresql/executor_noop.py 31 10 68% pytest_postgresql/factories/__init__.py 4 4 0% pytest_postgresql/factories/client.py 28 10 64% pytest_postgresql/factories/noprocess.py 34 14 59% pytest_postgresql/factories/process.py 71 31 56% pytest_postgresql/janitor.py 71 26 63% pytest_postgresql/loader.py 22 7 68% pytest_postgresql/plugin.py 45 20 56% pytest_postgresql/retry.py 22 8 64% -------------------------------------------------------------- TOTAL 462 194 58% =========================== short test summary info ============================ FAILED tests/test_executor.py::test_executor_init_with_password[en_US.UTF-8] - IndexError: list index out of range FAILED tests/test_executor.py::test_executor_init_with_password[de_DE.UTF-8] - IndexError: list index out of range FAILED tests/test_executor.py::test_executor_init_with_password[nl_NO.UTF-8] - IndexError: list index out of range FAILED tests/test_executor.py::test_executor_init_bad_tmp_path - IndexError: list index out of range FAILED tests/test_noopexecutor.py::test_noproc_cached_version - IndexError: list index out of range FAILED tests/test_postgres_options_plugin.py::test_postgres_options_config_in_cli - AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} Common items: {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} Differing items: {'errors': 1} != {'errors': 0} Full diff: { - 'errors': 0, ? ^ + 'errors': 1, ? ^ 'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0, } FAILED tests/test_postgres_options_plugin.py::test_postgres_options_config_in_ini - AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} Common items: {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} Differing items: {'errors': 1} != {'errors': 0} Full diff: { - 'errors': 0, ? ^ + 'errors': 1, ? ^ 'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0, } FAILED tests/test_postgres_options_plugin.py::test_postgres_loader_in_cli - AssertionError: assert {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 1, 'xpassed': 0, 'xfailed': 0} == {'passed': 1, 'skipped': 0, 'failed': 0, 'errors': 0, 'xpassed': 0, 'xfailed': 0} Common items: {'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0} Differing items: {'errors': 1} != {'errors': 0} Full diff: { - 'errors': 0, ? ^ + 'errors': 1, ? ^ 'failed': 0, 'passed': 1, 'skipped': 0, 'xfailed': 0, 'xpassed': 0, } FAILED tests/test_postgresql.py::test_postgresql_proc - assert False is True + where False = running() + where running = .running ERROR tests/test_postgresql.py::test_main_postgres - TimeoutError: Failed after 61 attempts ERROR tests/test_postgresql.py::test_two_postgreses - TimeoutError: Failed after 61 attempts ERROR tests/test_version.py::test_versions[pg_ctl (PostgreSQL) 16devel-16] - ExceptionGroup: errors while tearing down testsfailed=11 testscollected=46> (6 sub-exceptions) ======= 9 failed, 35 passed, 1 deselected, 3 errors in 213.98s (0:03:33) ======= Exception ignored in atexit callback: Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 84, in cleanup_subprocesses pids = processes_with_env(ENV_UUID, str(os.getpid())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range Exception ignored in: Traceback (most recent call last): File "/home/udu/aports/community/py3-pytest-postgresql/src/pytest-postgresql-7.0.2/pytest_postgresql/executor.py", line 238, in __del__ super().__del__() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 460, in __del__ self.kill() File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 408, in kill self._kill_all_kids(sig) File "/usr/lib/python3.12/site-packages/mirakuru/base.py", line 294, in _kill_all_kids pids = processes_with_env(ENV_UUID, self._uuid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/mirakuru/base_env.py", line 52, in processes_with_env_psutil for proc in psutil.process_iter(): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1510, in process_iter a = set(pids()) ^^^^^^ File "/usr/lib/python3.12/site-packages/psutil/__init__.py", line 1455, in pids _LOWEST_PID = ret[0] ~~~^^^ IndexError: list index out of range >>> ERROR: py3-pytest-postgresql: check failed >>> py3-pytest-postgresql: Uninstalling dependencies... (1/48) Purging .makedepends-py3-pytest-postgresql (20251013.023745) (2/48) Purging py3-port-for-pyc (0.7.4-r0) (3/48) Purging py3-port-for (0.7.4-r0) (4/48) Purging py3-psycopg-pyc (3.1.20-r0) (5/48) Purging py3-psycopg (3.1.20-r0) (6/48) Purging py3-mirakuru-pyc (2.6.1-r0) (7/48) Purging py3-mirakuru (2.6.1-r0) (8/48) Purging py3-psutil-pyc (7.0.0-r0) (9/48) Purging py3-psutil (7.0.0-r0) (10/48) Purging postgresql16 (16.10-r0) Executing postgresql16-16.10-r0.pre-deinstall (11/48) Purging postgresql16-client (16.10-r0) (12/48) Purging postgresql-common (1.2-r1) Executing postgresql-common-1.2-r1.pre-deinstall (13/48) Purging tzdata (2025b-r0) (14/48) Purging py3-setuptools-pyc (80.9.0-r0) (15/48) Purging py3-setuptools (80.9.0-r0) (16/48) Purging py3-wheel-pyc (0.46.1-r0) (17/48) Purging py3-wheel (0.46.1-r0) (18/48) Purging py3-gpep517-pyc (19-r0) (19/48) Purging py3-gpep517 (19-r0) (20/48) Purging py3-installer-pyc (0.7.0-r2) (21/48) Purging py3-installer (0.7.0-r2) (22/48) Purging py3-pytest-cov-pyc (5.0.0-r0) (23/48) Purging py3-pytest-cov (5.0.0-r0) (24/48) Purging py3-coverage-pyc (7.8.2-r0) (25/48) Purging py3-coverage (7.8.2-r0) (26/48) Purging py3-pytest-xdist-pyc (3.6.1-r0) (27/48) Purging py3-pytest-xdist (3.6.1-r0) (28/48) Purging py3-execnet-pyc (2.1.1-r0) (29/48) Purging py3-execnet (2.1.1-r0) (30/48) Purging py3-pytest-pyc (8.3.5-r0) (31/48) Purging py3-pytest (8.3.5-r0) (32/48) Purging py3-iniconfig-pyc (2.1.0-r0) (33/48) Purging py3-iniconfig (2.1.0-r0) (34/48) Purging py3-packaging-pyc (25.0-r0) (35/48) Purging py3-packaging (25.0-r0) (36/48) Purging py3-parsing-pyc (3.2.3-r0) (37/48) Purging py3-parsing (3.2.3-r0) (38/48) Purging py3-pluggy-pyc (1.5.0-r0) (39/48) Purging py3-pluggy (1.5.0-r0) (40/48) Purging py3-py-pyc (1.11.0-r4) (41/48) Purging py3-py (1.11.0-r4) (42/48) Purging icu-libs (76.1-r1) (43/48) Purging libldap (2.6.8-r0) (44/48) Purging libpq (17.6-r0) (45/48) Purging libsasl (2.1.28-r8) (46/48) Purging libxml2 (2.13.9-r0) (47/48) Purging lz4-libs (1.10.0-r0) (48/48) Purging icu-data-en (76.1-r1) Executing busybox-1.37.0-r19.trigger OK: 296 MiB in 89 packages