File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
usr/lib/python3/dist-packages/stdisplay/tests Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import os
10
10
import subprocess
11
+ from pathlib import Path
11
12
import unittest
12
13
from stdisplay .stdisplay import (
13
14
get_sgr_support ,
@@ -63,12 +64,15 @@ def shell(
63
64
"""
64
65
test_dir = os .path .dirname (os .path .abspath (__file__ ))
65
66
script_dir = os .path .dirname (test_dir )
66
- command = "../../../../bin/stprint"
67
+ stprint_absolute_path = "../../../../bin/stprint"
68
+ stprint_absolute_path = str (Path (stprint_absolute_path ).resolve ())
67
69
input_data = ""
68
70
if stdin :
71
+ command = [stprint_absolute_path ]
69
72
input_data = text
70
73
else :
71
- command += f" '{ text } '"
74
+ command = [stprint_absolute_path , text ]
75
+
72
76
## Avoid tester environment from affecting tests, such as CI having
73
77
## TERM=dumb, but also allow us testing if RegEx is correct
74
78
## depending on the terminal provided.
@@ -85,7 +89,6 @@ def shell(
85
89
input = input_data ,
86
90
env = env ,
87
91
cwd = script_dir ,
88
- shell = True ,
89
92
capture_output = True ,
90
93
check = True ,
91
94
text = True ,
You can’t perform that action at this time.
0 commit comments