Best Python code snippet using lettuce-tools_python
GattPtsTest.py
Source:GattPtsTest.py
...84 self.dut.unbond_device(self.peer_identifier)85 # BEGIN GATT CLIENT TESTCASES #86 @PtsBaseClass.pts_test_wrap87 def test_gatt_cl_gad_bv_01_c(self):88 return self.pts.execute_test("GATT/CL/GAD/BV-01-C")89 @PtsBaseClass.pts_test_wrap90 def test_gatt_cl_gad_bv_03_c(self):91 return self.pts.execute_test("GATT/CL/GAD/BV-03-C")92 @PtsBaseClass.pts_test_wrap93 def test_gatt_cl_gad_bv_04_c(self):94 return self.pts.execute_test("GATT/CL/GAD/BV-04-C")95 @PtsBaseClass.pts_test_wrap96 def test_gatt_cl_gad_bv_05_c(self):97 return self.pts.execute_test("GATT/CL/GAD/BV-05-C")98 @PtsBaseClass.pts_test_wrap99 def test_gatt_cl_gad_bv_06_c(self):100 return self.pts.execute_test("GATT/CL/GAD/BV-06-C")101 @PtsBaseClass.pts_test_wrap102 def test_gatt_cl_gad_bv_07_c(self):103 return self.pts.execute_test("GATT/CL/GAD/BV-07-C")104 @PtsBaseClass.pts_test_wrap105 def test_gatt_cl_gad_bv_08_c(self):106 return self.pts.execute_test("GATT/CL/GAD/BV-08-C")107 @PtsBaseClass.pts_test_wrap108 def test_gatt_cl_gar_bv_01_c(self):109 return self.pts.execute_test("GATT/CL/GAR/BV-01-C")110 @PtsBaseClass.pts_test_wrap111 def test_gatt_cl_gaw_bv_01_c(self):112 return self.pts.execute_test("GATT/CL/GAW/BV-01-C")113 @PtsBaseClass.pts_test_wrap114 def test_gatt_cl_gaw_bv_03_c(self):115 return self.pts.execute_test("GATT/CL/GAW/BV-03-C")116 @PtsBaseClass.pts_test_wrap117 def test_gatt_cl_gaw_bv_05_c(self):118 return self.pts.execute_test("GATT/CL/GAW/BV-05-C")119 @PtsBaseClass.pts_test_wrap120 def test_gatt_cl_gaw_bv_08_c(self):121 return self.pts.execute_test("GATT/CL/GAW/BV-08-C")122 @PtsBaseClass.pts_test_wrap123 def test_gatt_cl_gaw_bv_09_c(self):124 return self.pts.execute_test("GATT/CL/GAW/BV-09-C")125 @PtsBaseClass.pts_test_wrap126 def test_gatt_cl_gaw_bi_02_c(self):127 return self.pts.execute_test("GATT/CL/GAW/BI-02-C")128 @PtsBaseClass.pts_test_wrap129 def test_gatt_cl_gaw_bi_03_c(self):130 return self.pts.execute_test("GATT/CL/GAW/BI-03-C")131 @PtsBaseClass.pts_test_wrap132 def test_gatt_cl_gaw_bi_05_c(self):133 return self.pts.execute_test("GATT/CL/GAW/BI-05-C")134 @PtsBaseClass.pts_test_wrap135 def test_gatt_cl_gaw_bi_06_c(self):136 return self.pts.execute_test("GATT/CL/GAW/BI-06-C")137 @PtsBaseClass.pts_test_wrap138 def test_gatt_cl_gaw_bi_07_c(self):139 return self.pts.execute_test("GATT/CL/GAW/BI-07-C")140 @PtsBaseClass.pts_test_wrap141 def test_gatt_cl_gaw_bi_08_c(self):142 return self.pts.execute_test("GATT/CL/GAW/BI-08-C")143 @PtsBaseClass.pts_test_wrap144 def test_gatt_cl_gaw_bi_09_c(self):145 return self.pts.execute_test("GATT/CL/GAW/BI-09-C")146 @PtsBaseClass.pts_test_wrap147 def test_gatt_cl_gaw_bi_33_c(self):148 return self.pts.execute_test("GATT/CL/GAW/BI-33-C")149 @PtsBaseClass.pts_test_wrap150 def test_gatt_cl_gar_bv_01_c(self):151 return self.pts.execute_test("GATT/CL/GAR/BV-01-C")152 @PtsBaseClass.pts_test_wrap153 def test_gatt_cl_gar_bv_03_c(self):154 return self.pts.execute_test("GATT/CL/GAR/BV-03-C")155 @PtsBaseClass.pts_test_wrap156 def test_gatt_cl_gar_bv_04_c(self):157 return self.pts.execute_test("GATT/CL/GAR/BV-04-C")158 @PtsBaseClass.pts_test_wrap159 def test_gatt_cl_gar_bv_06_c(self):160 return self.pts.execute_test("GATT/CL/GAR/BV-06-C")161 @PtsBaseClass.pts_test_wrap162 def test_gatt_cl_gar_bv_07_c(self):163 return self.pts.execute_test("GATT/CL/GAR/BV-07-C")164 # END GATT CLIENT TESTCASES #165 # BEGIN GATT SERVER TESTCASES #166 @PtsBaseClass.pts_test_wrap167 def test_gatt_sr_gad_bv_01_c(self):168 self.dut.setup_gatt_server(169 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))170 return self.pts.execute_test("GATT/SR/GAD/BV-01-C")171 @PtsBaseClass.pts_test_wrap172 def test_gatt_sr_gad_bv_02_c(self):173 self.dut.setup_gatt_server(174 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))175 return self.pts.execute_test("GATT/SR/GAD/BV-02-C")176 @PtsBaseClass.pts_test_wrap177 def test_gatt_sr_gad_bv_03_c(self):178 self.dut.setup_gatt_server(179 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))180 return self.pts.execute_test("GATT/SR/GAD/BV-03-C")181 @PtsBaseClass.pts_test_wrap182 def test_gatt_sr_gad_bv_04_c(self):183 self.dut.setup_gatt_server(184 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))185 return self.pts.execute_test("GATT/SR/GAD/BV-04-C")186 @PtsBaseClass.pts_test_wrap187 def test_gatt_sr_gad_bv_05_c(self):188 self.dut.setup_gatt_server(189 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))190 return self.pts.execute_test("GATT/SR/GAD/BV-05-C")191 @PtsBaseClass.pts_test_wrap192 def test_gatt_sr_gad_bv_06_c(self):193 self.dut.setup_gatt_server(194 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))195 return self.pts.execute_test("GATT/SR/GAD/BV-06-C")196 @PtsBaseClass.pts_test_wrap197 def test_gatt_sr_gad_bv_07_c(self):198 self.dut.setup_gatt_server(199 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))200 return self.pts.execute_test("GATT/SR/GAD/BV-07-C")201 @PtsBaseClass.pts_test_wrap202 def test_gatt_sr_gad_bv_08_c(self):203 self.dut.setup_gatt_server(204 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))205 return self.pts.execute_test("GATT/SR/GAD/BV-08-C")206 @PtsBaseClass.pts_test_wrap207 def test_gatt_sr_gar_bv_01_c(self):208 self.dut.setup_gatt_server(209 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))210 return self.pts.execute_test("GATT/SR/GAR/BV-01-C")211 @PtsBaseClass.pts_test_wrap212 def test_gatt_sr_gar_bi_01_c(self):213 self.dut.setup_gatt_server(214 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))215 return self.pts.execute_test("GATT/SR/GAR/BI-01-C")216 @PtsBaseClass.pts_test_wrap217 def test_gatt_sr_gar_bi_02_c(self):218 if self.characteristic_read_invalid_handle is None:219 raise signals.TestSkip(220 "Required user params missing:\n{}\n{}".format(221 "characteristic_read_invalid_handle"))222 self.dut.setup_gatt_server(223 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))224 return self.pts.execute_test("GATT/SR/GAR/BI-02-C")225 @PtsBaseClass.pts_test_wrap226 def test_gatt_sr_gar_bi_05_c(self):227 self.dut.setup_gatt_server(228 gatt_test_database.GATT_SERVER_DB_MAPPING.get('TEST_DB_2'))229 return self.pts.execute_test("GATT/SR/GAR/BI-05-C")230 @PtsBaseClass.pts_test_wrap231 def test_gatt_sr_gar_bv_03_c(self):232 self.dut.setup_gatt_server(233 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))234 return self.pts.execute_test("GATT/SR/GAR/BV-03-C")235 @PtsBaseClass.pts_test_wrap236 def test_gatt_sr_gar_bi_06_c(self):237 if (self.characteristic_read_not_permitted_uuid is None238 or self.characteristic_read_not_permitted_handle is None):239 raise signals.TestSkip(240 "Required user params missing:\n{}\n{}".format(241 "characteristic_read_not_permitted_uuid",242 "characteristic_read_not_permitted_handle"))243 self.dut.setup_gatt_server(244 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))245 return self.pts.execute_test("GATT/SR/GAR/BI-06-C")246 @PtsBaseClass.pts_test_wrap247 def test_gatt_sr_gar_bi_07_c(self):248 if self.characteristic_attribute_not_found_uuid is None:249 raise signals.TestSkip("Required user params missing:\n{}".format(250 "characteristic_attribute_not_found_uuid"))251 self.dut.setup_gatt_server(252 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))253 return self.pts.execute_test("GATT/SR/GAR/BI-07-C")254 @PtsBaseClass.pts_test_wrap255 def test_gatt_sr_gar_bi_08_c(self):256 self.dut.setup_gatt_server(257 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))258 return self.pts.execute_test("GATT/SR/GAR/BI-08-C")259 def test_gatt_sr_gar_bi_11_c(self):260 self.dut.setup_gatt_server(261 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))262 return self.pts.execute_test("GATT/SR/GAR/BI-11-C")263 @PtsBaseClass.pts_test_wrap264 def test_gatt_sr_gar_bv_04_c(self):265 self.dut.setup_gatt_server(266 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))267 return self.pts.execute_test("GATT/SR/GAR/BV-04-C")268 @PtsBaseClass.pts_test_wrap269 def test_gatt_sr_gar_bi_12_c(self):270 if self.characteristic_read_not_permitted_handle is None:271 raise signals.TestSkip("Required user params missing:\n{}".format(272 "characteristic_read_not_permitted_handle"))273 self.dut.setup_gatt_server(274 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))275 return self.pts.execute_test("GATT/SR/GAR/BI-12-C")276 @PtsBaseClass.pts_test_wrap277 def test_gatt_sr_gar_bi_13_c(self):278 self.dut.setup_gatt_server(279 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))280 return self.pts.execute_test("GATT/SR/GAR/BI-13-C")281 @PtsBaseClass.pts_test_wrap282 def test_gatt_sr_gar_bi_14_c(self):283 if self.characteristic_read_invalid_handle is None:284 raise signals.TestSkip("Required user params missing:\n{}".format(285 "characteristic_read_invalid_handle"))286 self.dut.setup_gatt_server(287 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))288 return self.pts.execute_test("GATT/SR/GAR/BI-14-C")289 @PtsBaseClass.pts_test_wrap290 def test_gatt_sr_gar_bi_16_c(self):291 self.dut.setup_gatt_server(292 gatt_test_database.GATT_SERVER_DB_MAPPING.get('TEST_DB_2'))293 return self.pts.execute_test("GATT/SR/GAR/BI-16-C")294 @PtsBaseClass.pts_test_wrap295 def test_gatt_sr_gar_bv_06_c(self):296 self.dut.setup_gatt_server(297 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))298 return self.pts.execute_test("GATT/SR/GAR/BV-06-C")299 @PtsBaseClass.pts_test_wrap300 def test_gatt_sr_gar_bv_07_c(self):301 self.dut.setup_gatt_server(302 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))303 return self.pts.execute_test("GATT/SR/GAR/BV-07-C")304 @PtsBaseClass.pts_test_wrap305 def test_gatt_sr_gar_bv_08_c(self):306 self.dut.setup_gatt_server(307 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))308 return self.pts.execute_test("GATT/SR/GAR/BV-08-C")309 @PtsBaseClass.pts_test_wrap310 def test_gatt_sr_gaw_bv_01_c(self):311 self.dut.setup_gatt_server(312 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))313 return self.pts.execute_test("GATT/SR/GAW/BV-01-C")314 @PtsBaseClass.pts_test_wrap315 def test_gatt_sr_gaw_bv_03_c(self):316 self.dut.setup_gatt_server(317 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))318 return self.pts.execute_test("GATT/SR/GAW/BV-03-C")319 @PtsBaseClass.pts_test_wrap320 def test_gatt_sr_gaw_bi_03_c(self):321 self.dut.setup_gatt_server(322 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))323 return self.pts.execute_test("GATT/SR/GAW/BI-03-C")324 @PtsBaseClass.pts_test_wrap325 def test_gatt_sr_gaw_bi_07_c(self):326 self.dut.setup_gatt_server(327 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))328 return self.pts.execute_test("GATT/SR/GAW/BI-07-C")329 @PtsBaseClass.pts_test_wrap330 def test_gatt_sr_gaw_bi_08_c(self):331 self.dut.setup_gatt_server(332 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))333 return self.pts.execute_test("GATT/SR/GAW/BI-08-C")334 @PtsBaseClass.pts_test_wrap335 def test_gatt_sr_gaw_bi_12_c(self):336 self.dut.setup_gatt_server(337 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))338 return self.pts.execute_test("GATT/SR/GAW/BI-12-C")339 @PtsBaseClass.pts_test_wrap340 def test_gatt_sr_gaw_bi_13_c(self):341 self.dut.setup_gatt_server(342 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))343 return self.pts.execute_test("GATT/SR/GAW/BI-03-C")344 @PtsBaseClass.pts_test_wrap345 def test_gatt_sr_gaw_bv_05_c(self):346 self.dut.setup_gatt_server(347 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))348 return self.pts.execute_test("GATT/SR/GAW/BV-05-C")349 @PtsBaseClass.pts_test_wrap350 def test_gatt_sr_gaw_bi_09_c(self):351 self.dut.setup_gatt_server(352 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))353 return self.pts.execute_test("GATT/SR/GAW/BI-09-C")354 @PtsBaseClass.pts_test_wrap355 def test_gatt_sr_gaw_bv_06_c(self):356 self.dut.setup_gatt_server(357 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))358 return self.pts.execute_test("GATT/SR/GAW/BV-06-C")359 @PtsBaseClass.pts_test_wrap360 def test_gatt_sr_gaw_bv_07_c(self):361 self.dut.setup_gatt_server(362 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))363 return self.pts.execute_test("GATT/SR/GAW/BV-07-C")364 @PtsBaseClass.pts_test_wrap365 def test_gatt_sr_gaw_bv_09_c(self):366 self.dut.setup_gatt_server(367 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))368 return self.pts.execute_test("GATT/SR/GAW/BV-09-C")369 @PtsBaseClass.pts_test_wrap370 def test_gatt_sr_gaw_bv_10_c(self):371 self.dut.setup_gatt_server(372 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_1'))373 return self.pts.execute_test("GATT/SR/GAW/BV-10-C")374 @PtsBaseClass.pts_test_wrap375 def test_gatt_sr_gaw_bi_32_c(self):376 self.dut.setup_gatt_server(377 gatt_test_database.GATT_SERVER_DB_MAPPING.get('DB_TEST'))378 return self.pts.execute_test("GATT/SR/GAW/BI-32-C")379 @PtsBaseClass.pts_test_wrap380 def test_gatt_sr_gaw_bi_33_c(self):381 self.dut.setup_gatt_server(382 gatt_test_database.GATT_SERVER_DB_MAPPING.get('LARGE_DB_3'))383 return self.pts.execute_test("GATT/SR/GAW/BI-33-C")...
SdpPtsTest.py
Source:SdpPtsTest.py
...139 self.dut.set_discoverable(False)140 # BEGIN SDP TESTCASES #141 @PtsBaseClass.pts_test_wrap142 def test_sdp_sr_sa_bv_01_c(self):143 return self.pts.execute_test("SDP/SR/SA/BV-01-C")144 @PtsBaseClass.pts_test_wrap145 def test_sdp_sr_sa_bv_03_c(self):146 return self.pts.execute_test("SDP/SR/SA/BV-03-C")147 @PtsBaseClass.pts_test_wrap148 def test_sdp_sr_sa_bv_04_c(self):149 return self.pts.execute_test("SDP/SR/SA/BV-04-C")150 @PtsBaseClass.pts_test_wrap151 def test_sdp_sr_sa_bv_05_c(self):152 return self.pts.execute_test("SDP/SR/SA/BV-05-C")153 @PtsBaseClass.pts_test_wrap154 def test_sdp_sr_sa_bv_08_c(self):155 return self.pts.execute_test("SDP/SR/SA/BV-08-C")156 @PtsBaseClass.pts_test_wrap157 def test_sdp_sr_sa_bv_09_c(self):158 return self.pts.execute_test("SDP/SR/SA/BV-09-C")159 @PtsBaseClass.pts_test_wrap160 def test_sdp_sr_sa_bv_12_c(self):161 return self.pts.execute_test("SDP/SR/SA/BV-12-C")162 @PtsBaseClass.pts_test_wrap163 def test_sdp_sr_sa_bv_13_c(self):164 return self.pts.execute_test("SDP/SR/SA/BV-13-C")165 @PtsBaseClass.pts_test_wrap166 def test_sdp_sr_sa_bv_14_c(self):167 return self.pts.execute_test("SDP/SR/SA/BV-14-C")168 @PtsBaseClass.pts_test_wrap169 def test_sdp_sr_sa_bv_17_c(self):170 return self.pts.execute_test("SDP/SR/SA/BV-17-C")171 @PtsBaseClass.pts_test_wrap172 def test_sdp_sr_sa_bv_20_c(self):173 return self.pts.execute_test("SDP/SR/SA/BV-20-C")174 @PtsBaseClass.pts_test_wrap175 def test_sdp_sr_sa_bv_21_c(self):176 return self.pts.execute_test("SDP/SR/SA/BV-21-C")177 @PtsBaseClass.pts_test_wrap178 def test_sdp_sr_sa_bi_01_c(self):179 return self.pts.execute_test("SDP/SR/SA/BI-01-C")180 @PtsBaseClass.pts_test_wrap181 def test_sdp_sr_sa_bi_02_c(self):182 return self.pts.execute_test("SDP/SR/SA/BI-02-C")183 @PtsBaseClass.pts_test_wrap184 def test_sdp_sr_sa_bi_03_c(self):185 return self.pts.execute_test("SDP/SR/SA/BI-03-C")186 @PtsBaseClass.pts_test_wrap187 def test_sdp_sr_ss_bv_01_c(self):188 return self.pts.execute_test("SDP/SR/SS/BV-01-C")189 @PtsBaseClass.pts_test_wrap190 def test_sdp_sr_ss_bv_03_c(self):191 # Triggers continuation response for supported devices.192 num_of_records = 9193 for _ in range(num_of_records):194 self.dut.sdp_add_service(SDP_RECORD)195 return self.pts.execute_test("SDP/SR/SS/BV-03-C")196 @PtsBaseClass.pts_test_wrap197 def test_sdp_sr_ss_bv_04_c(self):198 # Triggers continuation response for supported devices.199 num_of_records = 9200 for _ in range(num_of_records):201 self.dut.sdp_add_service(SDP_RECORD)202 return self.pts.execute_test("SDP/SR/SS/BV-04-C")203 @PtsBaseClass.pts_test_wrap204 def test_sdp_sr_ss_bi_01_c(self):205 return self.pts.execute_test("SDP/SR/SS/BI-01-C")206 @PtsBaseClass.pts_test_wrap207 def test_sdp_sr_ss_bi_02_c(self):208 return self.pts.execute_test("SDP/SR/SS/BI-02-C")209 @PtsBaseClass.pts_test_wrap210 def test_sdp_sr_ssa_bv_01_c(self):211 return self.pts.execute_test("SDP/SR/SSA/BV-01-C")212 @PtsBaseClass.pts_test_wrap213 def test_sdp_sr_ssa_bv_02_c(self):214 return self.pts.execute_test("SDP/SR/SSA/BV-02-C")215 @PtsBaseClass.pts_test_wrap216 def test_sdp_sr_ssa_bv_03_c(self):217 return self.pts.execute_test("SDP/SR/SSA/BV-03-C")218 @PtsBaseClass.pts_test_wrap219 def test_sdp_sr_ssa_bv_04_c(self):220 return self.pts.execute_test("SDP/SR/SSA/BV-04-C")221 @PtsBaseClass.pts_test_wrap222 def test_sdp_sr_ssa_bv_06_c(self):223 return self.pts.execute_test("SDP/SR/SSA/BV-06-C")224 @PtsBaseClass.pts_test_wrap225 def test_sdp_sr_ssa_bv_10_c(self):226 return self.pts.execute_test("SDP/SR/SSA/BV-10-C")227 @PtsBaseClass.pts_test_wrap228 def test_sdp_sr_ssa_bv_11_c(self):229 return self.pts.execute_test("SDP/SR/SSA/BV-11-C")230 @PtsBaseClass.pts_test_wrap231 def test_sdp_sr_ssa_bv_12_c(self):232 return self.pts.execute_test("SDP/SR/SSA/BV-12-C")233 @PtsBaseClass.pts_test_wrap234 def test_sdp_sr_ssa_bv_13_c(self):235 return self.pts.execute_test("SDP/SR/SSA/BV-13-C")236 @PtsBaseClass.pts_test_wrap237 def test_sdp_sr_ssa_bv_16_c(self):238 return self.pts.execute_test("SDP/SR/SSA/BV-16-C")239 @PtsBaseClass.pts_test_wrap240 def test_sdp_sr_ssa_bv_17_c(self):241 return self.pts.execute_test("SDP/SR/SSA/BV-17-C")242 @PtsBaseClass.pts_test_wrap243 def test_sdp_sr_ssa_bv_18_c(self):244 return self.pts.execute_test("SDP/SR/SSA/BV-18-C")245 @PtsBaseClass.pts_test_wrap246 def test_sdp_sr_ssa_bv_20_c(self):247 return self.pts.execute_test("SDP/SR/SSA/BV-20-C")248 @PtsBaseClass.pts_test_wrap249 def test_sdp_sr_ssa_bv_23_c(self):250 return self.pts.execute_test("SDP/SR/SSA/BV-23-C")251 @PtsBaseClass.pts_test_wrap252 def test_sdp_sr_ssa_bi_01_c(self):253 return self.pts.execute_test("SDP/SR/SSA/BI-01-C")254 @PtsBaseClass.pts_test_wrap255 def test_sdp_sr_ssa_bi_02_c(self):256 return self.pts.execute_test("SDP/SR/SSA/BI-02-C")...
solution_p1.py
Source:solution_p1.py
...46 score += s47 else:48 pos += 149 return num_groups, score50def execute_test(test_num, data, expected_num_groups, expected_score):51 print "Test {0}...".format(test_num)52 num_groups, score = process_data(data)53 if num_groups != expected_num_groups:54 print "...wrong num_groups, saw {0}, but wanted {1}.".format(num_groups, expected_num_groups)55 sys.exit(-1)56 if score != expected_score:57 print "...wrong score, saw {0}, but wanted {1}.".format(score, expected_score)58 sys.exit(-1)59 print "...passed"60execute_test(1, "{}", 1, 1)61execute_test(2, "{{{}}}", 3, 6)62execute_test(3, "{{},{}}", 3, 5)63execute_test(4, "{{{},{},{{}}}}", 6, 16)64execute_test(5, "{<{},{},{{}}>}", 1, 1)65execute_test(6, "{<a>,<a>,<a>,<a>}", 1, 1)66execute_test(7, "{{<a>},{<a>},{<a>},{<a>}}", 5, 9)67execute_test(8, "{{<!>},{<!>},{<!>},{<a>}}", 2, 3)68execute_test(9, "{{<ab>},{<ab>},{<ab>},{<ab>}}", 5, 9)69execute_test(10, "{{<!!>},{<!!>},{<!!>},{<!!>}}", 5, 9)70execute_test(11, "{{<a!>},{<a!>},{<a!>},{<ab>}}", 2, 3)71with open("input.txt", "r") as f:72 data = f.read()73 num_groups, score = process_data(data)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!