Skip to content

Commit 14b4402

Browse files
committed
Cwd on Windows
1 parent 94215a2 commit 14b4402

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

testgres/node.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,15 +1674,13 @@ def _get_bin_path(self, filename):
16741674
class NodeApp:
16751675

16761676
def __init__(self, test_path=None, nodes_to_cleanup=None, os_ops=LocalOperations()):
1677-
print('ALEXEY in nodeapp init', test_path)
16781677
if test_path:
16791678
if os.path.isabs(test_path):
16801679
self.test_path = test_path
16811680
else:
16821681
self.test_path = os.path.join(os_ops.cwd(), test_path)
16831682
else:
16841683
self.test_path = os_ops.cwd()
1685-
print('ALEXEY in nodeapp resulting test path', self.test_path)
16861684
self.nodes_to_cleanup = nodes_to_cleanup if nodes_to_cleanup else []
16871685
self.os_ops = os_ops
16881686

testgres/operations/os_ops.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ def environ(self, var_name):
3737
raise NotImplementedError()
3838

3939
def cwd(self):
40-
if sys.platform == 'win32':
41-
raise NotImplementedError()
42-
return self.exec_command('pwd').decode().rstrip()
40+
if sys.platform == 'linux':
41+
cmd = 'pwd'
42+
elif sys.platform == 'win32':
43+
cmd = 'cd'
44+
return self.exec_command(cmd).decode().rstrip()
4345

4446
def find_executable(self, executable):
4547
raise NotImplementedError()

testgres/operations/remote_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import getpass
22
import os
3-
import logging
43
import platform
54
import subprocess
65
import tempfile

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