Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit231c5da

Browse files
committed
Determine test_path if not specified
1 parent1c23016 commit231c5da

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

‎testgres/node.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,9 +1672,17 @@ def _get_bin_path(self, filename):
16721672

16731673
classNodeApp:
16741674

1675-
def__init__(self,test_path,nodes_to_cleanup,os_ops=LocalOperations()):
1676-
self.test_path=test_path
1677-
self.nodes_to_cleanup=nodes_to_cleanup
1675+
def__init__(self,test_path=None,nodes_to_cleanup=None,os_ops=LocalOperations()):
1676+
print('ALEXEY in nodeapp init',test_path)
1677+
iftest_path:
1678+
ifos.path.isabs(test_path):
1679+
self.test_path=test_path
1680+
else:
1681+
self.test_path=os.path.join(os_ops.cwd(),test_path)
1682+
else:
1683+
self.test_path=os_ops.cwd()
1684+
print('ALEXEY in nodeapp resulting test path',self.test_path)
1685+
self.nodes_to_cleanup=nodes_to_cleanupifnodes_to_cleanupelse []
16781686
self.os_ops=os_ops
16791687

16801688
defmake_empty(

‎testgres/operations/os_ops.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importgetpass
22
importlocale
3+
importsys
34

45
try:
56
importpsycopg2aspglib# noqa: F401
@@ -35,6 +36,11 @@ def exec_command(self, cmd, **kwargs):
3536
defenviron(self,var_name):
3637
raiseNotImplementedError()
3738

39+
defcwd(self):
40+
ifsys.platform=='win32':
41+
raiseNotImplementedError()
42+
returnself.exec_command('pwd').decode().rstrip()
43+
3844
deffind_executable(self,executable):
3945
raiseNotImplementedError()
4046

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp