Skip to content

Commit ba34537

Browse files
author
Miroslava Ivanova
committed
one more refactoring
1 parent 49e647a commit ba34537

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

tests/build/common/help_tests.py

+29-10
Original file line numberDiff line numberDiff line change
@@ -63,104 +63,115 @@ def test_104_platform_remove_help(self):
6363

6464
HelpTests.verify_help(output)
6565
assert "platform remove" in output
66-
assert "Attributes" in output
6766
assert "Platform" in output
6867
assert "android" in output
6968

7069
if CURRENT_OS == OSType.OSX:
7170
assert "ios" in output
71+
assert "Attributes" in output
7272
else:
7373
assert "ios" not in output
74+
assert "Attributes" not in output
7475

7576
def test_105_update_help(self):
7677
output = Tns.run_tns_command("platform update --help")
7778

7879
HelpTests.verify_help(output)
7980
assert "platform update" in output
80-
assert "Attributes" in output
8181
assert "Android selected runtime" in output
8282

8383
if CURRENT_OS == OSType.OSX:
8484
assert "iOS latest runtime" in output
85+
assert "Attributes" in output
8586
else:
8687
assert "iOS latest runtime" not in output
88+
assert "Attributes" not in output
8789

8890
def test_106_prepare_help(self):
8991
output = Tns.run_tns_command("prepare --help")
9092

9193
HelpTests.verify_help(output)
9294
assert "prepare" in output
9395
assert "android" in output
94-
assert "Attributes" in output
9596

9697
if CURRENT_OS == OSType.OSX:
9798
assert "ios" in output
99+
assert "Attributes" in output
98100
else:
99101
assert "ios" not in output
102+
assert "Attributes" not in output
100103

101104
def test_107_build_help(self):
102105
output = Tns.run_tns_command("build --help")
103106

104107
HelpTests.verify_help(output)
105108
assert "build" in output
106109
assert "android" in output
107-
assert "Attributes" in output
108110

109111
if CURRENT_OS == OSType.OSX:
110112
assert "ios" in output
113+
assert "Attributes" in output
111114
else:
112115
assert "ios" not in output
116+
assert "Attributes" not in output
113117

114118
def test_108_deploy_help(self):
115119
output = Tns.run_tns_command("deploy --help")
116120

117121
HelpTests.verify_help(output)
118122
assert "deploy" in output
119-
assert "Attributes" in output
120123
assert "Options for Android" in output
121124
assert "device" in output
122125
assert "release" in output
123126

124127
if CURRENT_OS == OSType.OSX:
125128
assert "Options for iOS" in output
129+
assert "Attributes" in output
126130
else:
127131
assert "Options for iOS" not in output
132+
assert "Attributes" not in output
128133

129134
def test_109_run_help(self):
130135
output = Tns.run_tns_command("run --help")
131136

132137
HelpTests.verify_help(output)
133-
assert "Attributes" in output
134138
assert "run" in output
135139
assert "Options" in output
136140
assert "release" in output
137141
assert "device" in output
138142

143+
if CURRENT_OS == OSType.OSX:
144+
assert "Attributes" in output
145+
else:
146+
assert "Attributes" not in output
147+
139148
def test_110_debug_help(self):
140149
output = Tns.run_tns_command("debug --help")
141150

142151
HelpTests.verify_help(output)
143-
assert "Attributes" in output
144152
assert "debug" in output
145153
assert "android" in output
146154

147155
if CURRENT_OS == OSType.OSX:
148156
assert "ios" in output
157+
assert "Attributes" in output
149158
else:
150159
assert "ios" not in output
160+
assert "Attributes" not in output
151161

152162
def test_111_test_help(self):
153163
output = Tns.run_tns_command("test --help")
154164

155165
HelpTests.verify_help(output)
156-
assert "Attributes" in output
157166
assert "test" in output
158167
assert "android" in output
159168

160169
if CURRENT_OS == OSType.OSX:
161170
assert "ios" in output
171+
assert "Attributes" in output
162172
else:
163173
assert "ios" not in output
174+
assert "Attributes" not in output
164175

165176
def test_112_install_help(self):
166177
output = Tns.run_tns_command("install -h")
@@ -175,19 +186,27 @@ def test_113_plugin_help(self):
175186
output = Tns.run_tns_command("plugin --help")
176187

177188
HelpTests.verify_help(output)
178-
assert "Attributes" in output
179189
assert "plugin" in output
180190
assert "add" in output
181191
assert "remove" in output
182192
assert "update" in output
183193
assert "find" in output
184194
assert "search" in output
185195

196+
if CURRENT_OS == OSType.OSX:
197+
assert "Attributes" in output
198+
else:
199+
assert "Attributes" not in output
200+
186201
def test_114_device_log_help(self):
187202
output = Tns.run_tns_command("device log --help")
188203

189204
HelpTests.verify_help(output)
190-
assert "Attributes" in output
191205
assert "device log" in output
192206
assert "Options" in output
193207
assert "device" in output
208+
209+
if CURRENT_OS == OSType.OSX:
210+
assert "Attributes" in output
211+
else:
212+
assert "Attributes" not in output

0 commit comments

Comments
 (0)