@@ -33,7 +33,7 @@ def setUp(self):
33
33
print "#####"
34
34
print ""
35
35
36
- Emulator .stop_emulators ();
36
+ Emulator .stop_emulators ()
37
37
Folder .cleanup ('./TNSAppNoPlatform' )
38
38
Folder .cleanup ('./TNS_App/platforms/android/build/outputs' )
39
39
@@ -42,18 +42,17 @@ def tearDown(self):
42
42
43
43
@classmethod
44
44
def tearDownClass (cls ):
45
- Emulator .stop_emulators ();
45
+ Emulator .stop_emulators ()
46
46
Folder .cleanup ('./TNS_App' )
47
47
48
48
@unittest .skip ("Skipped because of https://github.com/NativeScript/nativescript-cli/issues/352" )
49
49
def test_001_emulate_android_in_running_emulator (self ):
50
50
51
- Emulator .ensure_available ();
51
+ Emulator .ensure_available ()
52
52
53
- Tns .create_app_platform_add (app_name = "TNS_App" , \
53
+ Tns .create_app_platform_add (app_name = "TNS_App" ,
54
54
platform = "android" , framework_path = ANDROID_RUNTIME_PATH )
55
- output = run (TNS_PATH + " emulate android --path TNS_App --timeout 600 --justlaunch" , \
56
- timeout = 660 )
55
+ output = run (TNS_PATH + " emulate android --path TNS_App --timeout 600 --justlaunch" , timeout = 660 )
57
56
assert "Project successfully prepared" in output
58
57
assert "Project successfully built" in output
59
58
@@ -68,11 +67,11 @@ def test_001_emulate_android_in_running_emulator(self):
68
67
69
68
def test_002_emulate_android_release (self ):
70
69
71
- output = run (TNS_PATH + " emulate android --avd Api19 " + \
72
- "--keyStorePath " + ANDROID_KEYSTORE_PATH + \
73
- " --keyStorePassword " + ANDROID_KEYSTORE_PASS + \
74
- " --keyStoreAlias " + ANDROID_KEYSTORE_ALIAS + \
75
- " --keyStoreAliasPassword " + ANDROID_KEYSTORE_ALIAS_PASS + \
70
+ output = run (TNS_PATH + " emulate android --avd Api19 " +
71
+ "--keyStorePath " + ANDROID_KEYSTORE_PATH +
72
+ " --keyStorePassword " + ANDROID_KEYSTORE_PASS +
73
+ " --keyStoreAlias " + ANDROID_KEYSTORE_ALIAS +
74
+ " --keyStoreAliasPassword " + ANDROID_KEYSTORE_ALIAS_PASS +
76
75
" --release --path TNS_App --timeout 600 --justlaunch" , timeout = 660 )
77
76
assert "Project successfully prepared" in output
78
77
assert "Project successfully built" in output
@@ -91,7 +90,7 @@ def test_200_emulate_android_inside_project_and_specify_emulator_name(self):
91
90
92
91
current_dir = os .getcwd ()
93
92
os .chdir (os .path .join (current_dir , "TNS_App" ))
94
- output = run (os .path .join (".." , TNS_PATH ) + \
93
+ output = run (os .path .join (".." , TNS_PATH ) +
95
94
" emulate android --avd Api19 --timeout 600 --justlaunch" , timeout = 660 )
96
95
os .chdir (current_dir )
97
96
assert "Project successfully prepared" in output
@@ -105,8 +104,8 @@ def test_200_emulate_android_inside_project_and_specify_emulator_name(self):
105
104
106
105
def test_300_emulate_android_platform_not_added (self ):
107
106
Tns .create_app (app_name = "TNSAppNoPlatform" )
108
- output = run (TNS_PATH + \
109
- " emulate android --avd Api19 --timeout 600 --justlaunch --path TNSAppNoPlatform" , \
107
+ output = run (TNS_PATH +
108
+ " emulate android --avd Api19 --timeout 600 --justlaunch --path TNSAppNoPlatform" ,
110
109
timeout = 660 )
111
110
assert "Copying template files..." in output
112
111
assert "Project successfully created." in output
@@ -121,7 +120,7 @@ def test_300_emulate_android_platform_not_added(self):
121
120
122
121
def test_400_emulate_invalid_platform (self ):
123
122
output = run (TNS_PATH + \
124
- " emulate invalidPlatform --path TNS_App --timeout 600 --justlaunch" , \
123
+ " emulate invalidPlatform --path TNS_App --timeout 600 --justlaunch" ,
125
124
timeout = 660 )
126
125
assert "The input is not valid sub-command for 'emulate' command" in output
127
126
assert "Usage" in output
@@ -130,7 +129,7 @@ def test_400_emulate_invalid_platform(self):
130
129
"Skipped because of https://github.com/NativeScript/nativescript-cli/issues/289" )
131
130
def test_401_emulate_invalid_avd (self ):
132
131
output = run (TNS_PATH + \
133
- " emulate android --avd invaliddevice_id --path TNS_App --timeout 600 --justlaunch" , \
132
+ " emulate android --avd invaliddevice_id --path TNS_App --timeout 600 --justlaunch" ,
134
133
timeout = 660 )
135
134
# TODO: Modify assert when issue is fixed
136
135
assert "'invalidPlatform' is not valid sub-command for 'emulate' command" in output
0 commit comments