Files
pgadmin4/web
Ashesh Vashi 208541cc48 fix: ImportExportServersTestCase uses sys.executable + surfaces subprocess errors
Two latent bugs in pgadmin/setup/tests/test_export_import_servers.py
caused this test to fail on macOS / modern Linux distros:

1. The test invoked the subprocesses with a hardcoded "python" via
   os.system. macOS and many modern Linux distros do not provide a
   "python" alias — only "python3" or a venv-specific binary. The
   subprocess fails with "sh: python: command not found", exits non-
   zero, and writes nothing to the dump-servers output file.

   Same root cause that a50a553b0 ("chore: feature tests use
   sys.executable") fixed for AppStarter; this is the same fix in the
   regression test.

2. Both os.system calls redirected stderr to /dev/null. When the
   subprocess failed the empty output file then tripped json.loads
   with the misleading "Expecting value: line 1 column 1 (char 0)"
   instead of surfacing the underlying "command not found" error.

Switch to subprocess.run with a list (so there is no shell quoting and
no command-injection surface), use sys.executable, capture stderr, and
self.fail() with the captured stderr if the subprocess exits non-zero.

Verified: setup.tests goes from 4 pass / 1 fail / 1 skip to 5 pass / 0
fail / 1 skip on PG18.
2026-05-05 15:03:00 +05:30
..
2026-01-05 13:33:45 +05:30
2022-04-01 17:22:16 +05:30
2026-01-05 13:33:45 +05:30
2026-01-05 13:33:45 +05:30
2026-01-05 13:33:45 +05:30
2026-03-30 17:44:32 +05:30