File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
import os
15
15
import subprocess
16
+ import sys
16
17
import unittest
17
18
18
19
19
20
class TestBasicTracerExample (unittest .TestCase ):
20
21
def test_basic_tracer (self ):
21
22
dirpath = os .path .dirname (os .path .realpath (__file__ ))
22
23
test_script = "{}/../tracer.py" .format (dirpath )
23
- output = subprocess .check_output (test_script ).decode ()
24
+ output = subprocess .check_output (
25
+ (sys .executable , test_script )
26
+ ).decode ()
24
27
25
28
self .assertIn ('name="foo"' , output )
26
29
self .assertIn ('name="bar"' , output )
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
import os
15
15
import subprocess
16
+ import sys
16
17
import unittest
17
18
from time import sleep
18
19
@@ -22,13 +23,15 @@ class TestHttpExample(unittest.TestCase):
22
23
def setup_class (cls ):
23
24
dirpath = os .path .dirname (os .path .realpath (__file__ ))
24
25
server_script = "{}/../server.py" .format (dirpath )
25
- cls .server = subprocess .Popen ([server_script ])
26
+ cls .server = subprocess .Popen ([sys . executable , server_script ])
26
27
sleep (1 )
27
28
28
29
def test_http (self ):
29
30
dirpath = os .path .dirname (os .path .realpath (__file__ ))
30
31
test_script = "{}/../tracer_client.py" .format (dirpath )
31
- output = subprocess .check_output (test_script ).decode ()
32
+ output = subprocess .check_output (
33
+ (sys .executable , test_script )
34
+ ).decode ()
32
35
self .assertIn ('name="/"' , output )
33
36
34
37
@classmethod
You can’t perform that action at this time.
0 commit comments