How to use getDescription method in autotest

Best Python code snippet using autotest_python

enum.convert.js

Source:enum.convert.js Github

copy

Full Screen

1/**2 * 获取产品类型描述3 * @type {{getDescription: ProductType.getDescription}}4 */5var ProductType = {6 getDescription: function (index) {7 switch (index) {8 case 1001:9 return "新手专享";10 case 1101:11 return "天添牛";12 case 1102:13 return "优益宝";14 case 1201:15 return "信托";16 case 1301:17 return "闪赚宝";18 case 1302:19 return "闪进宝";20 case 1401:21 return "0元购机";22 case 1501:23 return "月息宝";24 case 1601:25 return "闪利宝";26 case 1602:27 return "闪利宝C款";28 case 1701:29 return "浮动期";30 case 1702:31 return "定活宝";32 case 1801:33 return "安盈宝";34 case 1802:35 return "安益宝";36 case 1901:37 return "分期宝";38 case 2101:39 return "指数牛";40 case 2201:41 return "日益宝";42 case 3101 :43 return "活期宝";44 case 3201:45 return "零活宝";46 case 1902:47 return "钱信宝";48 default:49 return null;50 }51 }52}53/**54 * 获取产品状态描述55 * @type {{getDescription: ProductStatus.getDescription}}56 */57var ProductStatus = {58 getDescription: function (index) {59 switch (index) {60 case -1:61 return "<span style='color: #ab1e1e'>已删除</span>";62 case 1:63 return "<span style='color: #ACCD3C'>待审核</span>";64 case 2:65 return "<span style='color: #00dd1c'>销售中</span>";66 case 3:67 return "<span style='color: #1006F1'>已售完</span>";68 case 4:69 return "<span style='color: #2fa4e7'>回款中</span>";70 case 5:71 return "<span style='color: #117700'>已回款</span>";72 case 8:73 return "<span style='color: #770088'>数据异常</span>";74 case 9:75 return "<span style='color: #95B8E7'>预上架</span>";76 case 10:77 return "<span style='color: #95B8E7'>流标</span>";78 case 11:79 return "<span style='color: #95B8E7'>募集告警</span>";80 }81 }82}83/**84 * 利率描述85 * @type {{getDescription: Rate.getDescription}}86 */87var Rate = {88 getDescription: function (index) {89 return index + "%";90 }91}92/**93 *投资状态描述94 * @type{{getDescription:InvestStatus.getDescription}}95 */96var InvestStatus = {97 getDescription: function (index) {98 switch (index) {99 case 1:100 return "待支付";101 case 2:102 return "投资成功";103 case 3:104 return "已回款";105 case 4:106 return "支付失败";107 case 5:108 return "募集中";109 case 6:110 return "募集失败";111 case 7:112 return "监管行处理中";113 default:114 return null;115 }116 }117}118/**119 * 产品显示配置位置120 * @type {{getDescription: ProductShowPosition.getDescription}}121 */122var ProductShowPosition = {123 getDescription: function (index) {124 switch (index) {125 case 1:126 return "首页";127 case 2:128 return "列表";129 case 3:130 return "产品分类";131 }132 }133}134/**135 * 赎回状态136 * @type{{getDescription:RedeemStatus.getDescription}}137 */138var RedeemStatus = {139 getDescription: function (index) {140 switch (index) {141 case 1:142 return "不可赎回";143 case 2:144 return "可赎回";145 case 3:146 return "部分赎回";147 case 4:148 return "已赎回";149 default:150 return null;151 }152 }153}154/**155 * 产品详情显示位置156 * @type {{getDescription: ProductDetailsShowPage.getDescription}}157 */158var ProductDetailsShowPage = {159 getDescription: function (index) {160 switch (index) {161 case 1:162 return "产品信息页";163 case 2:164 return "项目及借款人页";165 default:166 return null;167 }168 }169}170/**171 * 利率类型172 * @type{{getDescription:RateType.getDescription}}173 */174var RateType = {175 getDescription: function (index) {176 switch (index) {177 case 1:178 return "基础利率";179 case 2:180 return "会员利率";181 case 3:182 return "活动利率";183 case 4:184 return "转让利率";185 case 5:186 return "募集利率";187 default:188 return null;189 }190 }191}192/**193 * 产品附属信息194 * @type {{getDescription: ProductFeatureType.getDescription}}195 */196var ProductFeatureType = {197 getDescription: function (index) {198 switch (index) {199 case 1:200 return "产品详情";201 case 2:202 return "安全保障";203 case 3:204 return "产品协议";205 case 4:206 return "产品特点及适合人群";207 case 5:208 return "产品简介及原理";209 case 6:210 return "募集期收益";211 case 301:212 return "产品协议";213 case 302:214 return "信息咨询与管理服务协议";215 case 303:216 return "债权转让服务协议";217 default:218 return null;219 }220 }221}222/**223 * 赎回请求状态224 * @type{{getDescription:RedeemRequestStatus.getDescription}}225 */226var RedeemRequestStatus = {227 getDescription: function (index) {228 switch (index) {229 case 1:230 return "待回款";231 case 2:232 return "回款中";233 case 3:234 return "已回款";235 case 4:236 return "回款失败";237 case 5:238 return "待确认";239 case 6:240 return "已撤销";241 default:242 return null;243 }244 }245}246/**247 * 广告类型248 * @type {{getDescription: ProductAdType.getDescription}}249 */250var ProductAdType = {251 getDescription: function (index) {252 switch (index) {253 case 1:254 return "产品宣传";255 case 2:256 return "会员宣传";257 case 3:258 return "活动宣传";259 default:260 return null;261 }262 }263}264/**265 * 借款人类型266 * @type {{getDescription: BorrowerType.getDescription}}267 */268var BorrowerType = {269 getDescription: function (index) {270 switch (index) {271 case 1:272 return "企业";273 case 2:274 return "个人";275 default:276 return null;277 }278 }279}280/**281 * 回款状态282 * @type{{getDescription:RefundStatus.getDescription}}283 */284var RefundStatus = {285 getDescription: function (index) {286 switch (index) {287 case 1:288 return "待处理";289 case 2:290 return "回款中";291 case 3:292 return "已回款";293 case 4:294 return "回款失败";295 default:296 return null;297 }298 }299}300/**301 *广告显示位置302 *@type{{getDescription: ProductAdShowPosition.getDescription}}303 */304var ProductAdShowPosition = {305 getDescription: function (index) {306 switch (index) {307 case 1:308 return "列表";309 case 2:310 return "详情页|列表";311 case 3:312 return "详情页";313 }314 }315}316/**317 * 广告是否登录318 * @type {{getDescription: ProductAdIsLogin.getDescription}}319 */320var ProductAdIsLogin = {321 getDescription: function (index) {322 switch (index) {323 case 0:324 return "全部";325 case 1:326 return "登录";327 case 2:328 return "不登录";329 default:330 return "全部";331 }332 }333}334/**335 * 加息利率类型336 * @type {{getDescription: RateType.getDescription}}337 */338var RateType = {339 getDescription: function (index) {340 switch (index) {341 case 1:342 return "产品利率";343 case 2:344 return "会员加息";345 case 3:346 return "活动加息";347 case 5:348 return "募集利率";349 }350 }351}352var CreateEvent = {353 getDescription: function (index) {354 switch (index) {355 case 1:356 return "注册";357 case 2:358 return "购买";359 case 4:360 return "脱敏";361 }362 }363}364var SealType = {365 getDescription: function (index) {366 switch (index) {367 case 1:368 return "用户签名";369 case 2:370 return "公司签章";371 }372 }373}374var UserType = {375 getDescription: function (index) {376 switch (index) {377 case 1:378 return "出借人";379 case 2:380 return "借款人";381 default:382 return "";383 }384 }385}386var holidayFlagType = {387 getDescription: function (index) {388 if (index) {389 return "节假日";390 } else {391 return "工作日";392 }393 }394}395var productBidType = {396 getDescription: function (index) {397 switch (index) {398 case 0:399 return "不限制";400 case 1:401 return "普通标";402 case 2:403 return "新手标";404 case 3:405 return "特惠标";406 }407 }408}409var ListModelType = {410 getDescription: function (index) {411 switch (index) {412 case 0:413 return "详情";414 case 1:415 return "列表";416 }417 }418}419var newbieFlagType = {420 getDescription: function (index) {421 if (index) {422 return "新手专区";423 } else {424 return "非新手专区";425 }426 }427}428var showFlag = {429 getDescription: function (index) {430 if (index) {431 return "显示";432 } else {433 return "不显示";434 }435 }436}437var ProductModuleBizType = {438 getDescription: function (index) {439 switch (index) {440 case 1:441 return "产品类型";442 case 2:443 return "投标类型";444 }445 }446}447var PriorityType = {448 getDescription: function (index) {449 switch (index) {450 case 0:451 return "普通";452 case 1:453 return "优先";454 }455 }456}457var ProductPriStatus = {458 getDescription: function (index) {459 switch (index) {460 case 1:461 return "有效";462 case 2:463 return "已完成";464 case -1:465 return "已删除";466 }467 }468}469var ReportType = {470 getDescription: function (index) {471 switch (index) {472 case 1:473 return "日报";474 case 2:475 return "月报";476 case 3:477 return "年报";478 }479 }480}481var PeriodUnit = {482 getDescription: function (index) {483 switch (index) {484 case 1:485 return "天";486 case 2:487 return "月";488 }489 }490}491var ReportStatus ={492 getDescription: function (index) {493 switch (index) {494 case 1:495 return "成功";496 case 2:497 return "<span style='color:red'>失败</span>";498 default:499 return "暂无数据";500 }501 }502}503var IsTransfer ={504 getDescription: function (index) {505 switch (index) {506 case 1:507 return "不可转让";508 case 2:509 return "可转让";510 }511 }512}513var RefundWay = {514 getDescription: function (index) {515 switch (index) {516 case 1:517 return "一次性还本付息";518 case 2:519 return "按日计息";520 case 3:521 return "每月付息到期还本";522 case 4:523 return "等额本息";524 case 5:525 return "等本等息";526 case 6:527 return "等额等息";528 case 7:529 return "先息后本";530 }531 }...

Full Screen

Full Screen

Restaurants.js

Source:Restaurants.js Github

copy

Full Screen

...9 'name'10 ],11 12 data: [13 { description: getDescription(), rating: Math.random() * 5, name: 'Cheesecake Factory', cuisine: 'American' },14 { description: getDescription(), rating: Math.random() * 5, name: 'University Cafe', cuisine: 'American' },15 { description: getDescription(), rating: Math.random() * 5, name: 'Slider Bar', cuisine: 'American' },16 { description: getDescription(), rating: Math.random() * 5, name: 'Shokolaat', cuisine: 'American' },17 { description: getDescription(), rating: Math.random() * 5, name: 'Gordon Biersch', cuisine: 'American' },18 { description: getDescription(), rating: Math.random() * 5, name: 'Crepevine', cuisine: 'American' },19 { description: getDescription(), rating: Math.random() * 5, name: 'Creamery', cuisine: 'American' },20 { description: getDescription(), rating: Math.random() * 5, name: 'Old Pro', cuisine: 'American' },21 { description: getDescription(), rating: Math.random() * 5, name: 'Nola\'s', cuisine: 'Cajun' },22 { description: getDescription(), rating: Math.random() * 5, name: 'House of Bagels', cuisine: 'Bagels' },23 { description: getDescription(), rating: Math.random() * 5, name: 'The Prolific Oven', cuisine: 'Sandwiches' },24 { description: getDescription(), rating: Math.random() * 5, name: 'La Strada', cuisine: 'Italian' },25 { description: getDescription(), rating: Math.random() * 5, name: 'Buca di Beppo', cuisine: 'Italian' },26 { description: getDescription(), rating: Math.random() * 5, name: 'Pasta?', cuisine: 'Italian' },27 { description: getDescription(), rating: Math.random() * 5, name: 'Madame Tam', cuisine: 'Asian' },28 { description: getDescription(), rating: Math.random() * 5, name: 'Sprout Cafe', cuisine: 'Salad' },29 { description: getDescription(), rating: Math.random() * 5, name: 'Pluto\'s', cuisine: 'Salad' },30 { description: getDescription(), rating: Math.random() * 5, name: 'Junoon', cuisine: 'Indian' },31 { description: getDescription(), rating: Math.random() * 5, name: 'Bistro Maxine', cuisine: 'French' },32 { description: getDescription(), rating: Math.random() * 5, name: 'Three Seasons', cuisine: 'Vietnamese' },33 { description: getDescription(), rating: Math.random() * 5, name: 'Sancho\'s Taquira', cuisine: 'Mexican' },34 { description: getDescription(), rating: Math.random() * 5, name: 'Reposado', cuisine: 'Mexican' },35 { description: getDescription(), rating: Math.random() * 5, name: 'Siam Royal', cuisine: 'Thai' },36 { description: getDescription(), rating: Math.random() * 5, name: 'Krung Siam', cuisine: 'Thai' },37 { description: getDescription(), rating: Math.random() * 5, name: 'Thaiphoon', cuisine: 'Thai' },38 { description: getDescription(), rating: Math.random() * 5, name: 'Tamarine', cuisine: 'Vietnamese' },39 { description: getDescription(), rating: Math.random() * 5, name: 'Joya', cuisine: 'Tapas' },40 { description: getDescription(), rating: Math.random() * 5, name: 'Jing Jing', cuisine: 'Chinese' },41 { description: getDescription(), rating: Math.random() * 5, name: 'Patxi\'s Pizza', cuisine: 'Pizza' },42 { description: getDescription(), rating: Math.random() * 5, name: 'Evvia Estiatorio', cuisine: 'Mediterranean' },43 { description: getDescription(), rating: Math.random() * 5, name: 'Cafe 220', cuisine: 'Mediterranean' },44 { description: getDescription(), rating: Math.random() * 5, name: 'Cafe Renaissance', cuisine: 'Mediterranean' },45 { description: getDescription(), rating: Math.random() * 5, name: 'Kan Zeman', cuisine: 'Mediterranean' },46 { description: getDescription(), rating: Math.random() * 5, name: 'Gyros-Gyros', cuisine: 'Mediterranean' },47 { description: getDescription(), rating: Math.random() * 5, name: 'Mango Caribbean Cafe', cuisine: 'Caribbean' },48 { description: getDescription(), rating: Math.random() * 5, name: 'Coconuts Caribbean Restaurant &amp; Bar', cuisine: 'Caribbean' },49 { description: getDescription(), rating: Math.random() * 5, name: 'Rose &amp; Crown', cuisine: 'English' },50 { description: getDescription(), rating: Math.random() * 5, name: 'Baklava', cuisine: 'Mediterranean' },51 { description: getDescription(), rating: Math.random() * 5, name: 'Mandarin Gourmet', cuisine: 'Chinese' },52 { description: getDescription(), rating: Math.random() * 5, name: 'Bangkok Cuisine', cuisine: 'Thai' },53 { description: getDescription(), rating: Math.random() * 5, name: 'Darbar Indian Cuisine', cuisine: 'Indian' },54 { description: getDescription(), rating: Math.random() * 5, name: 'Mantra', cuisine: 'Indian' },55 { description: getDescription(), rating: Math.random() * 5, name: 'Janta', cuisine: 'Indian' },56 { description: getDescription(), rating: Math.random() * 5, name: 'Hyderabad House', cuisine: 'Indian' },57 { description: getDescription(), rating: Math.random() * 5, name: 'Starbucks', cuisine: 'Coffee' },58 { description: getDescription(), rating: Math.random() * 5, name: 'Peet\'s Coffee', cuisine: 'Coffee' },59 { description: getDescription(), rating: Math.random() * 5, name: 'Coupa Cafe', cuisine: 'Coffee' },60 { description: getDescription(), rating: Math.random() * 5, name: 'Lytton Coffee Company', cuisine: 'Coffee' },61 { description: getDescription(), rating: Math.random() * 5, name: 'Il Fornaio', cuisine: 'Italian' },62 { description: getDescription(), rating: Math.random() * 5, name: 'Lavanda', cuisine: 'Mediterranean' },63 { description: getDescription(), rating: Math.random() * 5, name: 'MacArthur Park', cuisine: 'American' },64 { description: getDescription(), rating: Math.random() * 5, name: 'St Michael\'s Alley', cuisine: 'Californian' },65 { description: getDescription(), rating: Math.random() * 5, name: 'Cafe Renzo', cuisine: 'Italian' },66 { description: getDescription(), rating: Math.random() * 5, name: 'Osteria', cuisine: 'Italian' },67 { description: getDescription(), rating: Math.random() * 5, name: 'Vero', cuisine: 'Italian' },68 { description: getDescription(), rating: Math.random() * 5, name: 'Cafe Renzo', cuisine: 'Italian' },69 { description: getDescription(), rating: Math.random() * 5, name: 'Miyake', cuisine: 'Sushi' },70 { description: getDescription(), rating: Math.random() * 5, name: 'Sushi Tomo', cuisine: 'Sushi' },71 { description: getDescription(), rating: Math.random() * 5, name: 'Kanpai', cuisine: 'Sushi' },72 { description: getDescription(), rating: Math.random() * 5, name: 'Pizza My Heart', cuisine: 'Pizza' },73 { description: getDescription(), rating: Math.random() * 5, name: 'New York Pizza', cuisine: 'Pizza' },74 { description: getDescription(), rating: Math.random() * 5, name: 'California Pizza Kitchen', cuisine: 'Pizza' },75 { description: getDescription(), rating: Math.random() * 5, name: 'Round Table', cuisine: 'Pizza' },76 { description: getDescription(), rating: Math.random() * 5, name: 'Loving Hut', cuisine: 'Vegan' },77 { description: getDescription(), rating: Math.random() * 5, name: 'Garden Fresh', cuisine: 'Vegan' },78 { description: getDescription(), rating: Math.random() * 5, name: 'Cafe Epi', cuisine: 'French' },79 { description: getDescription(), rating: Math.random() * 5, name: 'Tai Pan', cuisine: 'Chinese' }80 ]81});82function getDescription(){83 var description;84 if (!getDescription.description) {85 getDescription.description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.".split(/[\W]+/);86 }87 description = getDescription.description.sort(randomSorter);88 return description.join(' ');89}90function randomSorter(a,b) {91 return 0.5 - Math.random();...

Full Screen

Full Screen

sceneloader.py

Source:sceneloader.py Github

copy

Full Screen

...56 desc = dict(classname='CylinderAffordanceItem', Name=name, uuid=newUUID(), pose=p, Color=color, Radius=float(col.geometry_data['radius']), Length = float(col.geometry_data['length']))57 self.affordanceManager.newAffordanceFromDescription(desc)58 59 def generateBoxLinkNode(self, aff):60 link = etree.Element('link', {'name':aff.getDescription()['Name']})61 link.append(etree.Element('pose'))62 pose = np.append(aff.getDescription()['pose'][0], transformUtils.quaternionToRollPitchYaw(aff.getDescription()['pose'][1]))63 link.find('pose').text = ' '.join(map(str, pose))64 dimensions = aff.getDescription()['Dimensions']65 66 if aff.getDescription()['Collision Enabled']:67 link.append(etree.Element('collision', {'name': 'collision'}))68 link.find('collision').append(etree.Element('geometry'))69 link.find('collision/geometry').append(etree.Element('box'))70 link.find('collision/geometry/box').append(etree.Element('size'))71 link.find('collision/geometry/box/size').text = ' '.join(map(str, dimensions))72 73 link.append(etree.Element('visual', {'name': 'visual'}))74 link.find('visual').append(etree.Element('geometry'))75 link.find('visual/geometry').append(etree.Element('box'))76 link.find('visual/geometry/box').append(etree.Element('size'))77 link.find('visual/geometry/box/size').text = ' '.join(map(str, dimensions))78 link.find('visual').append(etree.Element('material'))79 link.find('visual/material').append(etree.Element('diffuse'))80 link.find('visual/material/diffuse').text = '{:s} {:.1f}'.format(' '.join(map(str, aff.getDescription()['Color'])), aff.getDescription()['Alpha'])81 link.find('visual/material').append(etree.Element('ambient'))82 link.find('visual/material/ambient').text = '0 0 0 1'83 84 return link85 86 def generateCylinderLinkNode(self, aff):87 link = etree.Element('link', {'name':aff.getDescription()['Name']})88 link.append(etree.Element('pose'))89 pose = np.append(aff.getDescription()['pose'][0], transformUtils.quaternionToRollPitchYaw(aff.getDescription()['pose'][1]))90 link.find('pose').text = ' '.join(map(str, pose))91 92 if aff.getDescription()['Collision Enabled']:93 link.append(etree.Element('collision', {'name': 'collision'}))94 link.find('collision').append(etree.Element('geometry'))95 link.find('collision/geometry').append(etree.Element('cylinder'))96 link.find('collision/geometry/cylinder').append(etree.Element('radius'))97 link.find('collision/geometry/cylinder/radius').text = '{:.4f}'.format(aff.getDescription()['Radius'])98 link.find('collision/geometry/cylinder').append(etree.Element('length'))99 link.find('collision/geometry/cylinder/length').text = '{:.4f}'.format(aff.getDescription()['Length'])100 101 link.append(etree.Element('visual', {'name': 'visual'}))102 link.find('visual').append(etree.Element('geometry'))103 link.find('visual/geometry').append(etree.Element('cylinder'))104 link.find('visual/geometry/cylinder').append(etree.Element('radius'))105 link.find('visual/geometry/cylinder/radius').text = '{:.4f}'.format(aff.getDescription()['Radius'])106 link.find('visual/geometry/cylinder').append(etree.Element('length'))107 link.find('visual/geometry/cylinder/length').text = '{:.4f}'.format(aff.getDescription()['Length'])108 link.find('visual').append(etree.Element('material'))109 link.find('visual/material').append(etree.Element('diffuse'))110 link.find('visual/material/diffuse').text = '{:s} {:.1f}'.format(' '.join(map(str, aff.getDescription()['Color'])), aff.getDescription()['Alpha'])111 link.find('visual/material').append(etree.Element('ambient'))112 link.find('visual/material/ambient').text = '0 0 0 1'113 114 return link115 116 117 def generateSDFfromAffordances(self):118 filename= os.environ['DRC_BASE'] + '/software/models/worlds/directorAffordances.sdf'119 sdfFile = open(filename, 'w')120 am = segmentation.affordanceManager121 affordances = am.getAffordances()122 123 root = etree.Element('sdf', {'version': '1.4'})124 tree = etree.ElementTree(root)125 world = etree.Element('world', {'name': 'directorAffordances'})126 root.append(world)127 128 for aff in affordances:129 if aff.getDescription()['classname'] in ['BoxAffordanceItem', 'CylinderAffordanceItem']:130 131 model = etree.Element('model', {'name': aff.getDescription()['Name']})132 world.append(model)133 134 model.append(etree.Element('pose'))135 model.find('pose').text = '0 0 0 0 0 0'136 137 if aff.getDescription()['classname'] == 'BoxAffordanceItem':138 model.append(self.generateBoxLinkNode(aff))139 elif aff.getDescription()['classname'] == 'CylinderAffordanceItem':140 model.append(self.generateCylinderLinkNode(aff))141 else:142 print '{:s} is unsupported skipping {:s} affordance!'.format(aff.getDescription()['classname'], aff.getDescription()['Name'])143 144 tree.write(sdfFile)145 sdfFile.close()...

Full Screen

Full Screen

crondescriptor_test.py

Source:crondescriptor_test.py Github

copy

Full Screen

...5from crondescriptor.crondescriptor import Options6class CodeTest(unittest.TestCase):7 def testCron(self):8 descriptor = CronDescriptor()9 self.assertEqual("每分钟", descriptor.getDescription("* * * * *"))10 self.assertEqual("每分钟", descriptor.getDescription("*/1 * * * *"))11 self.assertEqual("每分钟", descriptor.getDescription("0 0/1 * * * ?"))12 self.assertEqual("每小时", descriptor.getDescription("0 0 * * * ?"))13 self.assertEqual("每小时", descriptor.getDescription("0 0 0/1 * * ?"))14 self.assertEqual("在 23:00, 星期一 到 星期五", descriptor.getDescription("0 23 ? * MON-FRI"))15 self.assertEqual("每秒", descriptor.getDescription("* * * * * *"))16 self.assertEqual("每 45 秒", descriptor.getDescription("*/45 * * * * *"))17 self.assertEqual("每 05 分钟", descriptor.getDescription("*/5 * * * *"))18 self.assertEqual("每 10 分钟", descriptor.getDescription("0 0/10 * * * ?"))19 self.assertEqual("每 05 分钟", descriptor.getDescription("0 */5 * * * *"))20 self.assertEqual("在 11:30, 星期一 到 星期五", descriptor.getDescription("30 11 * * 1-5"))21 self.assertEqual("在 11:30", descriptor.getDescription("30 11 * * *"))22 self.assertEqual("在 11:00 和 11:10 之间的每分钟", descriptor.getDescription("0-10 11 * * *"))23 self.assertEqual("每分钟, 仅在 三月", descriptor.getDescription("* * * 3 *"))24 self.assertEqual("每分钟, 仅在 三月 和 六月", descriptor.getDescription("* * * 3,6 *"))25 self.assertEqual("在 14:30 和 16:30", descriptor.getDescription("30 14,16 * * *"))26 self.assertEqual("在 06:30, 14:30 和 16:30", descriptor.getDescription("30 6,14,16 * * *"))27 self.assertEqual("在 09:46, 仅在 星期一", descriptor.getDescription("46 9 * * 1"))28 self.assertEqual("在 12:23, 每月的 15 号", descriptor.getDescription("23 12 15 * *"))29 self.assertEqual("在 12:23, 仅在 一月", descriptor.getDescription("23 12 * JAN *"))30 self.assertEqual("在 12:23, 仅在 一月", descriptor.getDescription("23 12 ? JAN *"))31 self.assertEqual("在 12:23, 一月 到 二月", descriptor.getDescription("23 12 * JAN-FEB *"))32 self.assertEqual("在 12:23, 一月 到 三月", descriptor.getDescription("23 12 * JAN-MAR *"))33 self.assertEqual("在 12:23, 仅在 星期日", descriptor.getDescription("23 12 * * SUN"))34 self.assertEqual("每 05 分钟, 在 15:00, 星期一 到 星期五", descriptor.getDescription("*/5 15 * * MON-FRI"))35 self.assertEqual("每分钟, 在 第三个星期一 每月", descriptor.getDescription("* * * * MON#3"))36 self.assertEqual("每分钟, 每月的最后一个 星期四 ", descriptor.getDescription("* * * * 4L"))37 self.assertEqual("每 05 分钟, 每月的最后一天, 仅在 一月", descriptor.getDescription("*/5 * L JAN *"))38 self.assertEqual("每分钟, 每月的最后一个平日", descriptor.getDescription("* * LW * *"))39 self.assertEqual("每分钟, 每月的最后一个平日", descriptor.getDescription("* * WL * *"))40 self.assertEqual("每分钟, 每月的 第一个平日 ", descriptor.getDescription("* * 1W * *"))41 self.assertEqual("每分钟, 每月的 第一个平日 ", descriptor.getDescription("* * W1 * *"))42 self.assertEqual("每分钟, 每月的 最接近 5 号的平日 ", descriptor.getDescription("* * 5W * *"))43 self.assertEqual("每分钟, 每月的 最接近 5 号的平日 ", descriptor.getDescription("* * W5 * *"))44 self.assertEqual("在 14:02:30", descriptor.getDescription("30 02 14 * * *"))45 self.assertEqual("在每分钟的 05 到 10 秒", descriptor.getDescription("5-10 * * * * *"))46 self.assertEqual("在每分钟的 05 到 10 秒, 在每小时的 30 到 35 分钟, 在 10:00 和 12:59 之间", descriptor.getDescription("5-10 30-35 10-12 * * *"))47 self.assertEqual("在每分钟的 30 秒, 每 05 分钟", descriptor.getDescription("30 */5 * * * *"))48 self.assertEqual("在每小时的 30 分, 在 10:00 和 13:59 之间, 仅在 星期三 和 星期五", descriptor.getDescription("0 30 10-13 ? * WED,FRI"))49 self.assertEqual("在每分钟的 10 秒, 每 05 分钟", descriptor.getDescription("10 0/5 * * * ?"))50 self.assertEqual("每 03 分钟, 在每小时的 02 到 59 分钟, 在 01:00, 09:00, 和 22:00, 在每月的 11 和 26 号之间, 一月 到 六月", descriptor.getDescription("2-59/3 1,9,22 11-26 1-6 ?"))51 self.assertEqual("在 06:00", descriptor.getDescription("0 0 6 1/1 * ?"))52 self.assertEqual("在每小时的 05 分", descriptor.getDescription("0 5 0/1 * * ?"))53 self.assertEqual("每秒, 仅在 2013", descriptor.getDescription("* * * * * * 2013"))54 self.assertEqual("每分钟, 仅在 2013 和 2014", descriptor.getDescription("* * * * * 2013,2014"))55 self.assertEqual("在 12:23, 一月 到 二月, 2013 到 2014", descriptor.getDescription("23 12 * JAN-FEB * 2013-2014"))56 self.assertEqual("在 12:23, 一月 到 三月, 2013 到 2015", descriptor.getDescription("23 12 * JAN-MAR * 2013-2015"))57 self.assertEqual("每 30 分钟, 在 08:00 和 09:59 之间, 每月的 5 和 20 号", descriptor.getDescription("0 0/30 8-9 5,20 * ?"))58 self.assertEqual("在 12:23, 在 第二个星期日 每月", descriptor.getDescription("23 12 * * SUN#2"))59 60 options = Options()61 options.dayOfWeekStartIndexZero = False62 self.assertEqual("在 12:23, 在 第二个星期日 每月", descriptor.getDescription("23 12 * * 1#2", options))63 self.assertEqual("在每小时的 25 分, 每 13 小时, 在 07:00 和 19:59 之间", descriptor.getDescription("0 25 7-19/13 ? * *"))64 self.assertEqual("在每小时的 25 分, 每 13 小时, 在 07:00 和 20:59 之间", descriptor.getDescription("0 25 7-20/13 ? * *"))65if __name__ == '__main__':...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful