Skip to content

Commit 7177212

Browse files
TestRemoteOperations::test_is_executable_true is corrected (#204)
Let's test a real pg_config.
1 parent b0f90d9 commit 7177212

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_remote.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from ..testgres import ExecUtilException
99
from ..testgres import InvalidOperationException
1010
from ..testgres import RemoteOperations
11+
from ..testgres import LocalOperations
1112
from ..testgres import ConnectionParams
13+
from ..testgres import utils as testgres_utils
1214

1315

1416
class TestRemoteOperations:
@@ -59,7 +61,11 @@ def test_is_executable_true(self):
5961
"""
6062
Test is_executable for an existing executable.
6163
"""
62-
cmd = os.getenv('PG_CONFIG')
64+
local_ops = LocalOperations()
65+
cmd = testgres_utils.get_bin_path2(local_ops, "pg_config")
66+
cmd = local_ops.exec_command([cmd, "--bindir"], encoding="utf-8")
67+
cmd = cmd.rstrip()
68+
cmd = os.path.join(cmd, "pg_config")
6369
response = self.operations.is_executable(cmd)
6470

6571
assert response is True

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy