File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import time
2
3
import unittest
3
4
4
- import time
5
5
from nose .tools import timed
6
6
7
+ from core .enums .os_type import OSType
7
8
from core .settings import Settings
8
9
from core .utils .file_utils import File
9
10
from core .utils .process import Process
@@ -36,6 +37,7 @@ def test_02_run_command_with_redirect(self):
36
37
assert result .output == '' , 'Output should be empty.'
37
38
assert self .current_file in File .read (path = out_file )
38
39
40
+ @unittest .skipIf (Settings .HOST_OS == OSType .WINDOWS , 'Skip on Windows.' )
39
41
def test_03_run_command_with_pipe (self ):
40
42
result = run (cmd = 'echo "test case" | wc -w ' , wait = True , timeout = 1 )
41
43
assert result .exit_code == 0 , 'Wrong exit code of successful command.'
Original file line number Diff line number Diff line change @@ -71,14 +71,16 @@ def get_url(output):
71
71
72
72
@staticmethod
73
73
def run_app (url , device_id , platform ):
74
- """Runs your project in the Preview App on simulator or emulator"""
74
+ """
75
+ Runs project in the Preview App on simulator or emulator.
76
+ """
75
77
if platform is Platform .IOS :
76
78
cmd = "xcrun simctl openurl {0} {1}." .format (device_id , url )
77
79
result = run (cmd )
78
80
assert 'error' not in result .output
79
81
elif platform is Platform .ANDROID :
80
- cmd = '{0} -s {1} shell am start -a android.intent.action.VIEW -d \
81
- "{2}" org.nativescript.preview' .format (ADB_PATH , device_id , url )
82
+ cmd = '{0} -s {1} shell am start -a android.intent.action.VIEW -d "{2}" org.nativescript.preview' \
83
+ .format (ADB_PATH , device_id , url )
82
84
result = run (cmd )
83
85
assert 'error' not in result .output
84
86
You can’t perform that action at this time.
0 commit comments