How to use scenario method in stryker-parent

Best JavaScript code snippet using stryker-parent

i18n.py

Source:i18n.py Github

copy

Full Screen

1# -*- coding: UTF-8 -*-2# -- FILE GENERATED BY: convert_i18n_yaml.py with i18n.yml3# pylint: disable=line-too-long4languages = \5{'ar': {'and': [u'*', u'\u0648'],6 'background': [u'\u0627\u0644\u062e\u0644\u0641\u064a\u0629'],7 'but': [u'*', u'\u0644\u0643\u0646'],8 'examples': [u'\u0627\u0645\u062b\u0644\u0629'],9 'feature': [u'\u062e\u0627\u0635\u064a\u0629'],10 'given': [u'*', u'\u0628\u0641\u0631\u0636'],11 'name': [u'Arabic'],12 'native': [u'\u0627\u0644\u0639\u0631\u0628\u064a\u0629'],13 'scenario': [u'\u0633\u064a\u0646\u0627\u0631\u064a\u0648'],14 'scenario_outline': [u'\u0633\u064a\u0646\u0627\u0631\u064a\u0648 \u0645\u062e\u0637\u0637'],15 'then': [u'*', u'\u0627\u0630\u0627\u064b', u'\u062b\u0645'],16 'when': [u'*',17 u'\u0645\u062a\u0649',18 u'\u0639\u0646\u062f\u0645\u0627']},19 'bg': {'and': [u'*', u'\u0418'],20 'background': [u'\u041f\u0440\u0435\u0434\u0438\u0441\u0442\u043e\u0440\u0438\u044f'],21 'but': [u'*', u'\u041d\u043e'],22 'examples': [u'\u041f\u0440\u0438\u043c\u0435\u0440\u0438'],23 'feature': [u'\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442'],24 'given': [u'*', u'\u0414\u0430\u0434\u0435\u043d\u043e'],25 'name': [u'Bulgarian'],26 'native': [u'\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438'],27 'scenario': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439'],28 'scenario_outline': [u'\u0420\u0430\u043c\u043a\u0430 \u043d\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439'],29 'then': [u'*', u'\u0422\u043e'],30 'when': [u'*', u'\u041a\u043e\u0433\u0430\u0442\u043e']},31 'ca': {'and': [u'*', u'I'],32 'background': [u'Rerefons', u'Antecedents'],33 'but': [u'*', u'Per\xf2'],34 'examples': [u'Exemples'],35 'feature': [u'Caracter\xedstica', u'Funcionalitat'],36 'given': [u'*', u'Donat', u'Donada', u'At\xe8s', u'Atesa'],37 'name': [u'Catalan'],38 'native': [u'catal\xe0'],39 'scenario': [u'Escenari'],40 'scenario_outline': [u"Esquema de l'escenari"],41 'then': [u'*', u'Aleshores', u'Cal'],42 'when': [u'*', u'Quan']},43 'cs': {'and': [u'*', u'A', u'A tak\xe9'],44 'background': [u'Pozad\xed', u'Kontext'],45 'but': [u'*', u'Ale'],46 'examples': [u'P\u0159\xedklady'],47 'feature': [u'Po\u017eadavek'],48 'given': [u'*', u'Pokud', u'Za p\u0159edpokladu'],49 'name': [u'Czech'],50 'native': [u'\u010cesky'],51 'scenario': [u'Sc\xe9n\xe1\u0159'],52 'scenario_outline': [u'N\xe1\u010drt Sc\xe9n\xe1\u0159e',53 u'Osnova sc\xe9n\xe1\u0159e'],54 'then': [u'*', u'Pak'],55 'when': [u'*', u'Kdy\u017e']},56 'cy-GB': {'and': [u'*', u'A'],57 'background': [u'Cefndir'],58 'but': [u'*', u'Ond'],59 'examples': [u'Enghreifftiau'],60 'feature': [u'Arwedd'],61 'given': [u'*', u'Anrhegedig a'],62 'name': [u'Welsh'],63 'native': [u'Cymraeg'],64 'scenario': [u'Scenario'],65 'scenario_outline': [u'Scenario Amlinellol'],66 'then': [u'*', u'Yna'],67 'when': [u'*', u'Pryd']},68 'da': {'and': [u'*', u'Og'],69 'background': [u'Baggrund'],70 'but': [u'*', u'Men'],71 'examples': [u'Eksempler'],72 'feature': [u'Egenskab'],73 'given': [u'*', u'Givet'],74 'name': [u'Danish'],75 'native': [u'dansk'],76 'scenario': [u'Scenarie'],77 'scenario_outline': [u'Abstrakt Scenario'],78 'then': [u'*', u'S\xe5'],79 'when': [u'*', u'N\xe5r']},80 'de': {'and': [u'*', u'Und'],81 'background': [u'Grundlage'],82 'but': [u'*', u'Aber'],83 'examples': [u'Beispiele'],84 'feature': [u'Funktionalit\xe4t'],85 'given': [u'*', u'Angenommen', u'Gegeben sei'],86 'name': [u'German'],87 'native': [u'Deutsch'],88 'scenario': [u'Szenario'],89 'scenario_outline': [u'Szenariogrundriss'],90 'then': [u'*', u'Dann'],91 'when': [u'*', u'Wenn']},92 'en': {'and': [u'*', u'And'],93 'background': [u'Background'],94 'but': [u'*', u'But'],95 'examples': [u'Examples', u'Scenarios'],96 'feature': [u'Feature'],97 'given': [u'*', u'Given'],98 'name': [u'English'],99 'native': [u'English'],100 'scenario': [u'Scenario'],101 'scenario_outline': [u'Scenario Outline', u'Scenario Template'],102 'then': [u'*', u'Then'],103 'when': [u'*', u'When']},104 'en-Scouse': {'and': [u'*', u'An'],105 'background': [u'Dis is what went down'],106 'but': [u'*', u'Buh'],107 'examples': [u'Examples'],108 'feature': [u'Feature'],109 'given': [u'*', u'Givun', u'Youse know when youse got'],110 'name': [u'Scouse'],111 'native': [u'Scouse'],112 'scenario': [u'The thing of it is'],113 'scenario_outline': [u'Wharrimean is'],114 'then': [u'*', u'Dun', u'Den youse gotta'],115 'when': [u'*', u'Wun', u'Youse know like when']},116 'en-au': {'and': [u'*', u'N'],117 'background': [u'Background'],118 'but': [u'*', u'Cept'],119 'examples': [u'Cobber'],120 'feature': [u'Crikey'],121 'given': [u'*', u'Ya know how'],122 'name': [u'Australian'],123 'native': [u'Australian'],124 'scenario': [u'Mate'],125 'scenario_outline': [u'Blokes'],126 'then': [u'*', u'Ya gotta'],127 'when': [u'*', u'When']},128 'en-lol': {'and': [u'*', u'AN'],129 'background': [u'B4'],130 'but': [u'*', u'BUT'],131 'examples': [u'EXAMPLZ'],132 'feature': [u'OH HAI'],133 'given': [u'*', u'I CAN HAZ'],134 'name': [u'LOLCAT'],135 'native': [u'LOLCAT'],136 'scenario': [u'MISHUN'],137 'scenario_outline': [u'MISHUN SRSLY'],138 'then': [u'*', u'DEN'],139 'when': [u'*', u'WEN']},140 'en-pirate': {'and': [u'*', u'Aye'],141 'background': [u'Yo-ho-ho'],142 'but': [u'*', u'Avast!'],143 'examples': [u'Dead men tell no tales'],144 'feature': [u'Ahoy matey!'],145 'given': [u'*', u'Gangway!'],146 'name': [u'Pirate'],147 'native': [u'Pirate'],148 'scenario': [u'Heave to'],149 'scenario_outline': [u'Shiver me timbers'],150 'then': [u'*', u'Let go and haul'],151 'when': [u'*', u'Blimey!']},152 'en-tx': {'and': [u'*', u"And y'all"],153 'background': [u'Background'],154 'but': [u'*', u"But y'all"],155 'examples': [u'Examples'],156 'feature': [u'Feature'],157 'given': [u'*', u"Given y'all"],158 'name': [u'Texan'],159 'native': [u'Texan'],160 'scenario': [u'Scenario'],161 'scenario_outline': [u"All y'all"],162 'then': [u'*', u"Then y'all"],163 'when': [u'*', u"When y'all"]},164 'eo': {'and': [u'*', u'Kaj'],165 'background': [u'Fono'],166 'but': [u'*', u'Sed'],167 'examples': [u'Ekzemploj'],168 'feature': [u'Trajto'],169 'given': [u'*', u'Donita\u0135o'],170 'name': [u'Esperanto'],171 'native': [u'Esperanto'],172 'scenario': [u'Scenaro'],173 'scenario_outline': [u'Konturo de la scenaro'],174 'then': [u'*', u'Do'],175 'when': [u'*', u'Se']},176 'es': {'and': [u'*', u'Y'],177 'background': [u'Antecedentes'],178 'but': [u'*', u'Pero'],179 'examples': [u'Ejemplos'],180 'feature': [u'Caracter\xedstica'],181 'given': [u'*', u'Dado', u'Dada', u'Dados', u'Dadas'],182 'name': [u'Spanish'],183 'native': [u'espa\xf1ol'],184 'scenario': [u'Escenario'],185 'scenario_outline': [u'Esquema del escenario'],186 'then': [u'*', u'Entonces'],187 'when': [u'*', u'Cuando']},188 'et': {'and': [u'*', u'Ja'],189 'background': [u'Taust'],190 'but': [u'*', u'Kuid'],191 'examples': [u'Juhtumid'],192 'feature': [u'Omadus'],193 'given': [u'*', u'Eeldades'],194 'name': [u'Estonian'],195 'native': [u'eesti keel'],196 'scenario': [u'Stsenaarium'],197 'scenario_outline': [u'Raamstsenaarium'],198 'then': [u'*', u'Siis'],199 'when': [u'*', u'Kui']},200 'fi': {'and': [u'*', u'Ja'],201 'background': [u'Tausta'],202 'but': [u'*', u'Mutta'],203 'examples': [u'Tapaukset'],204 'feature': [u'Ominaisuus'],205 'given': [u'*', u'Oletetaan'],206 'name': [u'Finnish'],207 'native': [u'suomi'],208 'scenario': [u'Tapaus'],209 'scenario_outline': [u'Tapausaihio'],210 'then': [u'*', u'Niin'],211 'when': [u'*', u'Kun']},212 'fr': {'and': [u'*', u'Et'],213 'background': [u'Contexte'],214 'but': [u'*', u'Mais'],215 'examples': [u'Exemples'],216 'feature': [u'Fonctionnalit\xe9'],217 'given': [u'*',218 u'Soit',219 u'Etant donn\xe9',220 u'Etant donn\xe9e',221 u'Etant donn\xe9s',222 u'Etant donn\xe9es',223 u'\xc9tant donn\xe9',224 u'\xc9tant donn\xe9e',225 u'\xc9tant donn\xe9s',226 u'\xc9tant donn\xe9es'],227 'name': [u'French'],228 'native': [u'fran\xe7ais'],229 'scenario': [u'Sc\xe9nario'],230 'scenario_outline': [u'Plan du sc\xe9nario', u'Plan du Sc\xe9nario'],231 'then': [u'*', u'Alors'],232 'when': [u'*', u'Quand', u'Lorsque', u"Lorsqu'<"]},233 'gl': {'and': [u'*', u'E'],234 'background': [u'Contexto'],235 'but': [u'*', u'Mais', u'Pero'],236 'examples': [u'Exemplos'],237 'feature': [u'Caracter\xedstica'],238 'given': [u'*', u'Dado', u'Dada', u'Dados', u'Dadas'],239 'name': [u'Galician'],240 'native': [u'galego'],241 'scenario': [u'Escenario'],242 'scenario_outline': [u'Esbozo do escenario'],243 'then': [u'*', u'Ent\xf3n', u'Logo'],244 'when': [u'*', u'Cando']},245 'he': {'and': [u'*', u'\u05d5\u05d2\u05dd'],246 'background': [u'\u05e8\u05e7\u05e2'],247 'but': [u'*', u'\u05d0\u05d1\u05dc'],248 'examples': [u'\u05d3\u05d5\u05d2\u05de\u05d0\u05d5\u05ea'],249 'feature': [u'\u05ea\u05db\u05d5\u05e0\u05d4'],250 'given': [u'*', u'\u05d1\u05d4\u05d9\u05e0\u05ea\u05df'],251 'name': [u'Hebrew'],252 'native': [u'\u05e2\u05d1\u05e8\u05d9\u05ea'],253 'scenario': [u'\u05ea\u05e8\u05d7\u05d9\u05e9'],254 'scenario_outline': [u'\u05ea\u05d1\u05e0\u05d9\u05ea \u05ea\u05e8\u05d7\u05d9\u05e9'],255 'then': [u'*', u'\u05d0\u05d6', u'\u05d0\u05d6\u05d9'],256 'when': [u'*', u'\u05db\u05d0\u05e9\u05e8']},257 'hr': {'and': [u'*', u'I'],258 'background': [u'Pozadina'],259 'but': [u'*', u'Ali'],260 'examples': [u'Primjeri', u'Scenariji'],261 'feature': [u'Osobina', u'Mogu\u0107nost', u'Mogucnost'],262 'given': [u'*', u'Zadan', u'Zadani', u'Zadano'],263 'name': [u'Croatian'],264 'native': [u'hrvatski'],265 'scenario': [u'Scenarij'],266 'scenario_outline': [u'Skica', u'Koncept'],267 'then': [u'*', u'Onda'],268 'when': [u'*', u'Kada', u'Kad']},269 'hu': {'and': [u'*', u'\xc9s'],270 'background': [u'H\xe1tt\xe9r'],271 'but': [u'*', u'De'],272 'examples': [u'P\xe9ld\xe1k'],273 'feature': [u'Jellemz\u0151'],274 'given': [u'*', u'Amennyiben', u'Adott'],275 'name': [u'Hungarian'],276 'native': [u'magyar'],277 'scenario': [u'Forgat\xf3k\xf6nyv'],278 'scenario_outline': [u'Forgat\xf3k\xf6nyv v\xe1zlat'],279 'then': [u'*', u'Akkor'],280 'when': [u'*', u'Majd', u'Ha', u'Amikor']},281 'id': {'and': [u'*', u'Dan'],282 'background': [u'Dasar'],283 'but': [u'*', u'Tapi'],284 'examples': [u'Contoh'],285 'feature': [u'Fitur'],286 'given': [u'*', u'Dengan'],287 'name': [u'Indonesian'],288 'native': [u'Bahasa Indonesia'],289 'scenario': [u'Skenario'],290 'scenario_outline': [u'Skenario konsep'],291 'then': [u'*', u'Maka'],292 'when': [u'*', u'Ketika']},293 'is': {'and': [u'*', u'Og'],294 'background': [u'Bakgrunnur'],295 'but': [u'*', u'En'],296 'examples': [u'D\xe6mi', u'Atbur\xf0ar\xe1sir'],297 'feature': [u'Eiginleiki'],298 'given': [u'*', u'Ef'],299 'name': [u'Icelandic'],300 'native': [u'\xcdslenska'],301 'scenario': [u'Atbur\xf0ar\xe1s'],302 'scenario_outline': [u'L\xfdsing Atbur\xf0ar\xe1sar',303 u'L\xfdsing D\xe6ma'],304 'then': [u'*', u'\xde\xe1'],305 'when': [u'*', u'\xdeegar']},306 'it': {'and': [u'*', u'E'],307 'background': [u'Contesto'],308 'but': [u'*', u'Ma'],309 'examples': [u'Esempi'],310 'feature': [u'Funzionalit\xe0'],311 'given': [u'*', u'Dato', u'Data', u'Dati', u'Date'],312 'name': [u'Italian'],313 'native': [u'italiano'],314 'scenario': [u'Scenario'],315 'scenario_outline': [u'Schema dello scenario'],316 'then': [u'*', u'Allora'],317 'when': [u'*', u'Quando']},318 'ja': {'and': [u'*', u'\u304b\u3064<'],319 'background': [u'\u80cc\u666f'],320 'but': [u'*',321 u'\u3057\u304b\u3057<',322 u'\u4f46\u3057<',323 u'\u305f\u3060\u3057<'],324 'examples': [u'\u4f8b', u'\u30b5\u30f3\u30d7\u30eb'],325 'feature': [u'\u30d5\u30a3\u30fc\u30c1\u30e3', u'\u6a5f\u80fd'],326 'given': [u'*', u'\u524d\u63d0<'],327 'name': [u'Japanese'],328 'native': [u'\u65e5\u672c\u8a9e'],329 'scenario': [u'\u30b7\u30ca\u30ea\u30aa'],330 'scenario_outline': [u'\u30b7\u30ca\u30ea\u30aa\u30a2\u30a6\u30c8\u30e9\u30a4\u30f3',331 u'\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8',332 u'\u30c6\u30f3\u30d7\u30ec',333 u'\u30b7\u30ca\u30ea\u30aa\u30c6\u30f3\u30d7\u30ec'],334 'then': [u'*', u'\u306a\u3089\u3070<'],335 'when': [u'*', u'\u3082\u3057<']},336 'ko': {'and': [u'*', u'\uadf8\ub9ac\uace0<'],337 'background': [u'\ubc30\uacbd'],338 'but': [u'*', u'\ud558\uc9c0\ub9cc<', u'\ub2e8<'],339 'examples': [u'\uc608'],340 'feature': [u'\uae30\ub2a5'],341 'given': [u'*', u'\uc870\uac74<', u'\uba3c\uc800<'],342 'name': [u'Korean'],343 'native': [u'\ud55c\uad6d\uc5b4'],344 'scenario': [u'\uc2dc\ub098\ub9ac\uc624'],345 'scenario_outline': [u'\uc2dc\ub098\ub9ac\uc624 \uac1c\uc694'],346 'then': [u'*', u'\uadf8\ub7ec\uba74<'],347 'when': [u'*', u'\ub9cc\uc77c<', u'\ub9cc\uc57d<']},348 'lt': {'and': [u'*', u'Ir'],349 'background': [u'Kontekstas'],350 'but': [u'*', u'Bet'],351 'examples': [u'Pavyzd\u017eiai', u'Scenarijai', u'Variantai'],352 'feature': [u'Savyb\u0117'],353 'given': [u'*', u'Duota'],354 'name': [u'Lithuanian'],355 'native': [u'lietuvi\u0173 kalba'],356 'scenario': [u'Scenarijus'],357 'scenario_outline': [u'Scenarijaus \u0161ablonas'],358 'then': [u'*', u'Tada'],359 'when': [u'*', u'Kai']},360 'lu': {'and': [u'*', u'an', u'a'],361 'background': [u'Hannergrond'],362 'but': [u'*', u'awer', u'm\xe4'],363 'examples': [u'Beispiller'],364 'feature': [u'Funktionalit\xe9it'],365 'given': [u'*', u'ugeholl'],366 'name': [u'Luxemburgish'],367 'native': [u'L\xebtzebuergesch'],368 'scenario': [u'Szenario'],369 'scenario_outline': [u'Plang vum Szenario'],370 'then': [u'*', u'dann'],371 'when': [u'*', u'wann']},372 'lv': {'and': [u'*', u'Un'],373 'background': [u'Konteksts', u'Situ\u0101cija'],374 'but': [u'*', u'Bet'],375 'examples': [u'Piem\u0113ri', u'Paraugs'],376 'feature': [u'Funkcionalit\u0101te', u'F\u012b\u010da'],377 'given': [u'*', u'Kad'],378 'name': [u'Latvian'],379 'native': [u'latvie\u0161u'],380 'scenario': [u'Scen\u0101rijs'],381 'scenario_outline': [u'Scen\u0101rijs p\u0113c parauga'],382 'then': [u'*', u'Tad'],383 'when': [u'*', u'Ja']},384 'nl': {'and': [u'*', u'En'],385 'background': [u'Achtergrond'],386 'but': [u'*', u'Maar'],387 'examples': [u'Voorbeelden'],388 'feature': [u'Functionaliteit'],389 'given': [u'*', u'Gegeven', u'Stel'],390 'name': [u'Dutch'],391 'native': [u'Nederlands'],392 'scenario': [u'Scenario'],393 'scenario_outline': [u'Abstract Scenario'],394 'then': [u'*', u'Dan'],395 'when': [u'*', u'Als']},396 'no': {'and': [u'*', u'Og'],397 'background': [u'Bakgrunn'],398 'but': [u'*', u'Men'],399 'examples': [u'Eksempler'],400 'feature': [u'Egenskap'],401 'given': [u'*', u'Gitt'],402 'name': [u'Norwegian'],403 'native': [u'norsk'],404 'scenario': [u'Scenario'],405 'scenario_outline': [u'Scenariomal', u'Abstrakt Scenario'],406 'then': [u'*', u'S\xe5'],407 'when': [u'*', u'N\xe5r']},408 'pl': {'and': [u'*', u'Oraz', u'I'],409 'background': [u'Za\u0142o\u017cenia'],410 'but': [u'*', u'Ale'],411 'examples': [u'Przyk\u0142ady'],412 'feature': [u'W\u0142a\u015bciwo\u015b\u0107'],413 'given': [u'*', u'Zak\u0142adaj\u0105c', u'Maj\u0105c'],414 'name': [u'Polish'],415 'native': [u'polski'],416 'scenario': [u'Scenariusz'],417 'scenario_outline': [u'Szablon scenariusza'],418 'then': [u'*', u'Wtedy'],419 'when': [u'*', u'Je\u017celi', u'Je\u015bli']},420 'pt': {'and': [u'*', u'E'],421 'background': [u'Contexto'],422 'but': [u'*', u'Mas'],423 'examples': [u'Exemplos'],424 'feature': [u'Funcionalidade'],425 'given': [u'*', u'Dado', u'Dada', u'Dados', u'Dadas'],426 'name': [u'Portuguese'],427 'native': [u'portugu\xeas'],428 'scenario': [u'Cen\xe1rio', u'Cenario'],429 'scenario_outline': [u'Esquema do Cen\xe1rio', u'Esquema do Cenario'],430 'then': [u'*', u'Ent\xe3o', u'Entao'],431 'when': [u'*', u'Quando']},432 'ro': {'and': [u'*', u'Si', u'\u0218i', u'\u015ei'],433 'background': [u'Context'],434 'but': [u'*', u'Dar'],435 'examples': [u'Exemple'],436 'feature': [u'Functionalitate',437 u'Func\u021bionalitate',438 u'Func\u0163ionalitate'],439 'given': [u'*',440 u'Date fiind',441 u'Dat fiind',442 u'Dati fiind',443 u'Da\u021bi fiind',444 u'Da\u0163i fiind'],445 'name': [u'Romanian'],446 'native': [u'rom\xe2n\u0103'],447 'scenario': [u'Scenariu'],448 'scenario_outline': [u'Structura scenariu',449 u'Structur\u0103 scenariu'],450 'then': [u'*', u'Atunci'],451 'when': [u'*', u'Cand', u'C\xe2nd']},452 'ru': {'and': [u'*',453 u'\u0418',454 u'\u041a \u0442\u043e\u043c\u0443 \u0436\u0435'],455 'background': [u'\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f',456 u'\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442'],457 'but': [u'*', u'\u041d\u043e', u'\u0410'],458 'examples': [u'\u041f\u0440\u0438\u043c\u0435\u0440\u044b'],459 'feature': [u'\u0424\u0443\u043d\u043a\u0446\u0438\u044f',460 u'\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b',461 u'\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e'],462 'given': [u'*',463 u'\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c',464 u'\u0414\u0430\u043d\u043e',465 u'\u041f\u0443\u0441\u0442\u044c'],466 'name': [u'Russian'],467 'native': [u'\u0440\u0443\u0441\u0441\u043a\u0438\u0439'],468 'scenario': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439'],469 'scenario_outline': [u'\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f'],470 'then': [u'*', u'\u0422\u043e', u'\u0422\u043e\u0433\u0434\u0430'],471 'when': [u'*',472 u'\u0415\u0441\u043b\u0438',473 u'\u041a\u043e\u0433\u0434\u0430']},474 'sk': {'and': [u'*', u'A'],475 'background': [u'Pozadie'],476 'but': [u'*', u'Ale'],477 'examples': [u'Pr\xedklady'],478 'feature': [u'Po\u017eiadavka'],479 'given': [u'*', u'Pokia\u013e'],480 'name': [u'Slovak'],481 'native': [u'Slovensky'],482 'scenario': [u'Scen\xe1r'],483 'scenario_outline': [u'N\xe1\u010drt Scen\xe1ru'],484 'then': [u'*', u'Tak'],485 'when': [u'*', u'Ke\u010f']},486 'sr-Cyrl': {'and': [u'*', u'\u0418'],487 'background': [u'\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442',488 u'\u041e\u0441\u043d\u043e\u0432\u0430',489 u'\u041f\u043e\u0437\u0430\u0434\u0438\u043d\u0430'],490 'but': [u'*', u'\u0410\u043b\u0438'],491 'examples': [u'\u041f\u0440\u0438\u043c\u0435\u0440\u0438',492 u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0438'],493 'feature': [u'\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442',494 u'\u041c\u043e\u0433\u0443\u045b\u043d\u043e\u0441\u0442',495 u'\u041e\u0441\u043e\u0431\u0438\u043d\u0430'],496 'given': [u'*',497 u'\u0417\u0430\u0434\u0430\u0442\u043e',498 u'\u0417\u0430\u0434\u0430\u0442\u0435',499 u'\u0417\u0430\u0434\u0430\u0442\u0438'],500 'name': [u'Serbian'],501 'native': [u'\u0421\u0440\u043f\u0441\u043a\u0438'],502 'scenario': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u043e',503 u'\u041f\u0440\u0438\u043c\u0435\u0440'],504 'scenario_outline': [u'\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0458\u0430',505 u'\u0421\u043a\u0438\u0446\u0430',506 u'\u041a\u043e\u043d\u0446\u0435\u043f\u0442'],507 'then': [u'*', u'\u041e\u043d\u0434\u0430'],508 'when': [u'*',509 u'\u041a\u0430\u0434\u0430',510 u'\u041a\u0430\u0434']},511 'sr-Latn': {'and': [u'*', u'I'],512 'background': [u'Kontekst', u'Osnova', u'Pozadina'],513 'but': [u'*', u'Ali'],514 'examples': [u'Primeri', u'Scenariji'],515 'feature': [u'Funkcionalnost',516 u'Mogu\u0107nost',517 u'Mogucnost',518 u'Osobina'],519 'given': [u'*', u'Zadato', u'Zadate', u'Zatati'],520 'name': [u'Serbian (Latin)'],521 'native': [u'Srpski (Latinica)'],522 'scenario': [u'Scenario', u'Primer'],523 'scenario_outline': [u'Struktura scenarija',524 u'Skica',525 u'Koncept'],526 'then': [u'*', u'Onda'],527 'when': [u'*', u'Kada', u'Kad']},528 'sv': {'and': [u'*', u'Och'],529 'background': [u'Bakgrund'],530 'but': [u'*', u'Men'],531 'examples': [u'Exempel'],532 'feature': [u'Egenskap'],533 'given': [u'*', u'Givet'],534 'name': [u'Swedish'],535 'native': [u'Svenska'],536 'scenario': [u'Scenario'],537 'scenario_outline': [u'Abstrakt Scenario', u'Scenariomall'],538 'then': [u'*', u'S\xe5'],539 'when': [u'*', u'N\xe4r']},540 'tr': {'and': [u'*', u'Ve'],541 'background': [u'Ge\xe7mi\u015f'],542 'but': [u'*', u'Fakat', u'Ama'],543 'examples': [u'\xd6rnekler'],544 'feature': [u'\xd6zellik'],545 'given': [u'*', u'Diyelim ki'],546 'name': [u'Turkish'],547 'native': [u'T\xfcrk\xe7e'],548 'scenario': [u'Senaryo'],549 'scenario_outline': [u'Senaryo tasla\u011f\u0131'],550 'then': [u'*', u'O zaman'],551 'when': [u'*', u'E\u011fer ki']},552 'uk': {'and': [u'*',553 u'\u0406',554 u'\u0410 \u0442\u0430\u043a\u043e\u0436',555 u'\u0422\u0430'],556 'background': [u'\u041f\u0435\u0440\u0435\u0434\u0443\u043c\u043e\u0432\u0430'],557 'but': [u'*', u'\u0410\u043b\u0435'],558 'examples': [u'\u041f\u0440\u0438\u043a\u043b\u0430\u0434\u0438'],559 'feature': [u'\u0424\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b'],560 'given': [u'*',561 u'\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e',562 u'\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u0449\u043e',563 u'\u041d\u0435\u0445\u0430\u0439',564 u'\u0414\u0430\u043d\u043e'],565 'name': [u'Ukrainian'],566 'native': [u'\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430'],567 'scenario': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0456\u0439'],568 'scenario_outline': [u'\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e'],569 'then': [u'*', u'\u0422\u043e', u'\u0422\u043e\u0434\u0456'],570 'when': [u'*',571 u'\u042f\u043a\u0449\u043e',572 u'\u041a\u043e\u043b\u0438']},573 'uz': {'and': [u'*', u'\u0412\u0430'],574 'background': [u'\u0422\u0430\u0440\u0438\u0445'],575 'but': [u'*',576 u'\u041b\u0435\u043a\u0438\u043d',577 u'\u0411\u0438\u0440\u043e\u043a',578 u'\u0410\u043c\u043c\u043e'],579 'examples': [u'\u041c\u0438\u0441\u043e\u043b\u043b\u0430\u0440'],580 'feature': [u'\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b'],581 'given': [u'*', u'\u0410\u0433\u0430\u0440'],582 'name': [u'Uzbek'],583 'native': [u'\u0423\u0437\u0431\u0435\u043a\u0447\u0430'],584 'scenario': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439'],585 'scenario_outline': [u'\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0441\u0438'],586 'then': [u'*', u'\u0423\u043d\u0434\u0430'],587 'when': [u'*', u'\u0410\u0433\u0430\u0440']},588 'vi': {'and': [u'*', u'V\xe0'],589 'background': [u'B\u1ed1i c\u1ea3nh'],590 'but': [u'*', u'Nh\u01b0ng'],591 'examples': [u'D\u1eef li\u1ec7u'],592 'feature': [u'T\xednh n\u0103ng'],593 'given': [u'*', u'Bi\u1ebft', u'Cho'],594 'name': [u'Vietnamese'],595 'native': [u'Ti\u1ebfng Vi\u1ec7t'],596 'scenario': [u'T\xecnh hu\u1ed1ng', u'K\u1ecbch b\u1ea3n'],597 'scenario_outline': [u'Khung t\xecnh hu\u1ed1ng',598 u'Khung k\u1ecbch b\u1ea3n'],599 'then': [u'*', u'Th\xec'],600 'when': [u'*', u'Khi']},601 'zh-CN': {'and': [u'*', u'\u800c\u4e14<'],602 'background': [u'\u80cc\u666f'],603 'but': [u'*', u'\u4f46\u662f<'],604 'examples': [u'\u4f8b\u5b50'],605 'feature': [u'\u529f\u80fd'],606 'given': [u'*', u'\u5047\u5982<'],607 'name': [u'Chinese simplified'],608 'native': [u'\u7b80\u4f53\u4e2d\u6587'],609 'scenario': [u'\u573a\u666f'],610 'scenario_outline': [u'\u573a\u666f\u5927\u7eb2'],611 'then': [u'*', u'\u90a3\u4e48<'],612 'when': [u'*', u'\u5f53<']},613 'zh-TW': {'and': [u'*', u'\u800c\u4e14<', u'\u4e26\u4e14<'],614 'background': [u'\u80cc\u666f'],615 'but': [u'*', u'\u4f46\u662f<'],616 'examples': [u'\u4f8b\u5b50'],617 'feature': [u'\u529f\u80fd'],618 'given': [u'*', u'\u5047\u8a2d<'],619 'name': [u'Chinese traditional'],620 'native': [u'\u7e41\u9ad4\u4e2d\u6587'],621 'scenario': [u'\u5834\u666f', u'\u5287\u672c'],622 'scenario_outline': [u'\u5834\u666f\u5927\u7db1',623 u'\u5287\u672c\u5927\u7db1'],624 'then': [u'*', u'\u90a3\u9ebc<'],...

Full Screen

Full Screen

parser.py

Source:parser.py Github

copy

Full Screen

...144 def _build_scenario_statement(self, keyword, line):145 name = line[len(keyword) + 1:].strip()146 self.statement = model.Scenario(self.filename, self.line,147 keyword, name, tags=self.tags)148 self.feature.add_scenario(self.statement)149 # -- RESET STATE:150 self.tags = []151 def _build_scenario_outline_statement(self, keyword, line):152 # pylint: disable=C0103153 # C0103 Invalid name "build_scenario_outline_statement", too long.154 name = line[len(keyword) + 1:].strip()155 self.statement = model.ScenarioOutline(self.filename, self.line,156 keyword, name, tags=self.tags)157 self.feature.add_scenario(self.statement)158 # -- RESET STATE:159 self.tags = []160 def _build_examples(self, keyword, line):161 if not isinstance(self.statement, model.ScenarioOutline):162 message = u"Examples must only appear inside scenario outline"163 raise ParserError(message, self.line, self.filename, line)164 name = line[len(keyword) + 1:].strip()165 self.examples = model.Examples(self.filename, self.line,166 keyword, name, tags=self.tags)167 # pylint: disable=E1103168 # E1103 Instance of "Background" has no "examples" member169 # (but some types could not be inferred).170 self.statement.examples.append(self.examples)171 # -- RESET STATE:172 self.tags = []173 def diagnose_feature_usage_error(self):174 if self.feature:175 return "Multiple features in one file are not supported."176 else:177 return "Feature should not be used here."178 def diagnose_background_usage_error(self):179 if self.feature and self.feature.scenarios:180 return "Background may not occur after Scenario/ScenarioOutline."181 elif self.tags:182 return "Background does not support tags."183 else:184 return "Background should not be used here."185 def diagnose_scenario_usage_error(self):186 if not self.feature:187 return "Scenario may not occur before Feature."188 else:189 return "Scenario should not be used here."190 def diagnose_scenario_outline_usage_error(self): # pylint: disable=invalid-name191 if not self.feature:192 return "ScenarioOutline may not occur before Feature."193 else:194 return "ScenarioOutline should not be used here."195 def ask_parse_failure_oracle(self, line):196 """197 Try to find the failure reason when a parse failure occurs:198 Oracle, oracle, ... what went wrong?199 Zzzz200 :param line: Text line where parse failure occured (as string).201 :return: Reason (as string) if an explanation is found.202 Otherwise, empty string or None.203 """204 feature_kwd = self.match_keyword("feature", line)205 if feature_kwd:206 return self.diagnose_feature_usage_error()207 background_kwd = self.match_keyword("background", line)208 if background_kwd:209 return self.diagnose_background_usage_error()210 scenario_kwd = self.match_keyword("scenario", line)211 if scenario_kwd:212 return self.diagnose_scenario_usage_error()213 scenario_outline_kwd = self.match_keyword("scenario_outline", line)214 if scenario_outline_kwd:215 return self.diagnose_scenario_outline_usage_error()216 # -- OTHERWISE:217 if self.variant == "feature" and not self.feature:218 return "No feature found."219 # -- FINALLY: No glue what went wrong.220 return None221 def action(self, line):222 if line.strip().startswith("#") and self.state != "multiline":223 if self.state != "init" or self.tags or self.variant != "feature":224 return225 # -- DETECT: language comment (at begin of feature file; state=init)226 line = line.strip()[1:].strip()227 if line.lstrip().lower().startswith("language:"):228 language = line[9:].strip()229 self.language = language230 self.keywords = i18n.languages[language]231 return232 func = getattr(self, "action_" + self.state, None)233 if func is None:234 line = line.strip()235 msg = u"Parser in unknown state %s;" % self.state236 raise ParserError(msg, self.line, self.filename, line)237 if not func(line):238 line = line.strip()239 msg = u'\nParser failure in state %s, at line %d: "%s"\n' % \240 (self.state, self.line, line)241 reason = self.ask_parse_failure_oracle(line)242 if reason:243 msg += u"REASON: %s" % reason244 raise ParserError(msg, None, self.filename)245 def action_init(self, line):246 line = line.strip()247 if line.startswith("@"):248 self.tags.extend(self.parse_tags(line))249 return True250 feature_kwd = self.match_keyword("feature", line)251 if feature_kwd:252 self._build_feature(feature_kwd, line)253 self.state = "feature"254 return True255 return False256 # def subaction_detect_next_scenario(self, line):257 # if line.startswith("@"):258 # self.tags.extend(self.parse_tags(line))259 # self.state = "next_scenario"260 # return True261 #262 # scenario_kwd = self.match_keyword("scenario", line)263 # if scenario_kwd:264 # self._build_scenario_statement(scenario_kwd, line)265 # self.state = "scenario"266 # return True267 #268 # scenario_outline_kwd = self.match_keyword("scenario_outline", line)269 # if scenario_outline_kwd:270 # self._build_scenario_outline_statement(scenario_outline_kwd, line)271 # self.state = "scenario"272 # return True273 #274 # # -- OTHERWISE:275 # return False276 # pylint: disable=invalid-name277 def subaction_detect_taggable_statement(self, line):278 """Subaction is used after first tag line is detected.279 Additional lines with tags or taggable_statement follow.280 Taggable statements (excluding Feature) are:281 * Scenario282 * ScenarioOutline283 * Examples (within ScenarioOutline)284 """285 if line.startswith("@"):286 self.tags.extend(self.parse_tags(line))287 self.state = "taggable_statement"288 return True289 scenario_kwd = self.match_keyword("scenario", line)290 if scenario_kwd:291 self._build_scenario_statement(scenario_kwd, line)292 self.state = "scenario"293 return True294 scenario_outline_kwd = self.match_keyword("scenario_outline", line)295 if scenario_outline_kwd:296 self._build_scenario_outline_statement(scenario_outline_kwd, line)297 self.state = "scenario"298 return True299 examples_kwd = self.match_keyword("examples", line)300 if examples_kwd:301 self._build_examples(examples_kwd, line)302 self.state = "table"303 return True304 # -- OTHERWISE:305 return False306 # pylint: enable=invalid-name307 def action_feature(self, line):308 line = line.strip()309 # OLD: if self.subaction_detect_next_scenario(line):310 if self.subaction_detect_taggable_statement(line):311 # -- DETECTED: Next Scenario, ScenarioOutline (or tags)312 return True313 background_kwd = self.match_keyword("background", line)314 if background_kwd:315 self._build_background_statement(background_kwd, line)316 self.state = "steps"317 return True318 self.feature.description.append(line)319 return True320 # def action_next_scenario(self, line):321 # """322 # Entered after first tag for Scenario/ScenarioOutline is detected.323 # """324 # line = line.strip()325 # if self.subaction_detect_next_scenario(line):326 # return True327 #328 # return False329 def action_taggable_statement(self, line):330 """Entered after first tag for Scenario/ScenarioOutline or331 Examples is detected (= taggable_statement except Feature).332 Taggable statements (excluding Feature) are:333 * Scenario334 * ScenarioOutline335 * Examples (within ScenarioOutline)336 """337 line = line.strip()338 if self.subaction_detect_taggable_statement(line):339 # -- DETECTED: Next Scenario, ScenarioOutline or Examples (or tags)340 return True341 return False342 def action_scenario(self, line):343 """344 Entered when Scenario/ScenarioOutline keyword/line is detected.345 Hunts/collects scenario description lines.346 DETECT:347 * first step of Scenario/ScenarioOutline348 * next Scenario/ScenarioOutline.349 """350 line = line.strip()351 step = self.parse_step(line)352 if step:353 # -- FIRST STEP DETECTED: End collection of scenario descriptions.354 self.state = "steps"355 self.statement.steps.append(step)356 return True357 # -- CASE: Detect next Scenario/ScenarioOutline358 # * Scenario with scenario description, but without steps.359 # * Title-only scenario without scenario description and steps.360 # OLD: if self.subaction_detect_next_scenario(line):361 if self.subaction_detect_taggable_statement(line):362 # -- DETECTED: Next Scenario, ScenarioOutline (or tags)363 return True364 # -- OTHERWISE: Add scenario description line.365 # pylint: disable=E1103366 # E1103 Instance of "Background" has no "description" member...367 self.statement.description.append(line)368 return True369 def action_steps(self, line):370 """371 Entered when first step is detected (or nested step parsing).372 Subcases:373 * step374 * multi-line text (doc-string), following a step...

Full Screen

Full Screen

progress.py

Source:progress.py Github

copy

Full Screen

...50 self.stream.write("%s " % six.text_type(feature.filename))51 self.stream.flush()52 def background(self, background):53 pass54 def scenario(self, scenario):55 """56 Process the next scenario.57 But first allow to report the status on the last scenario.58 """59 self.report_scenario_completed()60 self.current_scenario = scenario61 def step(self, step):62 self.steps.append(step)63 def result(self, result):64 self.steps.pop(0)65 self.report_step_progress(result)66 def eof(self):67 """68 Called at end of a feature.69 It would be better to have a hook that is called after all features.70 """71 self.report_scenario_completed()72 self.report_feature_completed()73 self.report_failures()74 self.stream.flush()75 self.reset()76 # -- SPECIFIC PART:77 def report_step_progress(self, result):78 """79 Report the progress on the current step.80 The default implementation is empty.81 It should be override by a concrete class.82 """83 pass84 def report_scenario_progress(self):85 """86 Report the progress for the current/last scenario.87 The default implementation is empty.88 It should be override by a concrete class.89 """90 pass91 def report_feature_completed(self):92 """Hook called when a feature is completed to perform the last tasks.93 """94 pass95 def report_scenario_completed(self):96 """Hook called when a scenario is completed to perform the last tasks.97 """98 self.report_scenario_progress()99 def report_feature_duration(self):100 if self.show_timings and self.current_feature:101 self.stream.write(u" # %.3fs" % self.current_feature.duration)102 self.stream.write("\n")103 def report_scenario_duration(self):104 if self.show_timings and self.current_scenario:105 self.stream.write(u" # %.3fs" % self.current_scenario.duration)106 self.stream.write("\n")107 def report_failures(self):108 if self.failures:109 separator = "-" * 80110 self.stream.write(u"%s\n" % separator)111 for result in self.failures:112 self.stream.write(u"FAILURE in step '%s':\n" % result.name)113 self.stream.write(u" Feature: %s\n" % result.feature.name)114 self.stream.write(u" Scenario: %s\n" % result.scenario.name)115 self.stream.write(u"%s\n" % result.error_message)116 if result.exception:117 self.stream.write(u"exception: %s\n" % result.exception)118 self.stream.write(u"%s\n" % separator)119# -----------------------------------------------------------------------------120# CLASS: ScenarioProgressFormatter121# -----------------------------------------------------------------------------122class ScenarioProgressFormatter(ProgressFormatterBase):123 """124 Report dotted progress for each scenario similar to unittest.125 """126 name = "progress"127 description = "Shows dotted progress for each executed scenario."128 def report_scenario_progress(self):129 """130 Report the progress for the current/last scenario.131 """132 if not self.current_scenario:133 return # SKIP: No results to report for first scenario.134 # -- NORMAL-CASE:135 status_name = self.current_scenario.status.name136 dot_status = self.dot_status[status_name]137 if status_name == "failed":138 # MAYBE TODO: self.failures.append(result)139 pass140 self.stream.write(dot_status)141 self.stream.flush()142 def report_feature_completed(self):143 self.report_feature_duration()144# -----------------------------------------------------------------------------145# CLASS: StepProgressFormatter146# -----------------------------------------------------------------------------147class StepProgressFormatter(ProgressFormatterBase):148 """149 Report dotted progress for each step similar to unittest.150 """151 name = "progress2"152 description = "Shows dotted progress for each executed step."153 def report_step_progress(self, result):154 """155 Report the progress for each step.156 """157 dot_status = self.dot_status[result.status.name]158 if result.status == Status.failed:159 if (result.exception and160 not isinstance(result.exception, AssertionError)):161 # -- ISA-ERROR: Some Exception162 dot_status = self.dot_status["error"]163 result.feature = self.current_feature164 result.scenario = self.current_scenario165 self.failures.append(result)166 self.stream.write(dot_status)167 self.stream.flush()168 def report_feature_completed(self):169 self.report_feature_duration()170# -----------------------------------------------------------------------------171# CLASS: ScenarioStepProgressFormatter172# -----------------------------------------------------------------------------173class ScenarioStepProgressFormatter(StepProgressFormatter):174 """175 Shows detailed dotted progress for both each step of a scenario.176 Differs from StepProgressFormatter by:177 * showing scenario names (as prefix scenario step progress)178 * showing failures after each scenario (if necessary)179 EXAMPLE:180 $ behave -f progress3 features181 Feature with failing scenario # features/failing_scenario.feature182 Simple scenario with last failing step ....F183 -----------------------------------------------------------------------184 FAILURE in step 'last step fails' (features/failing_scenario.feature:7):185 Assertion Failed: xxx186 -----------------------------------------------------------------------187 """188 name = "progress3"189 description = "Shows detailed progress for each step of a scenario."190 indent_size = 2191 scenario_prefix = " " * indent_size192 # -- FORMATTER API:193 def feature(self, feature):194 self.current_feature = feature195 self.stream.write(u"%s # %s" % (feature.name, feature.filename))196 def scenario(self, scenario):197 """Process the next scenario."""198 # -- LAST SCENARIO: Report failures (if any).199 self.report_scenario_completed()200 # -- NEW SCENARIO:201 assert not self.failures202 self.current_scenario = scenario203 scenario_name = scenario.name204 if scenario_name:205 scenario_name += " "206 self.stream.write(u"%s%s " % (self.scenario_prefix, scenario_name))207 self.stream.flush()208 # -- DISABLED:209 # def eof(self):210 # has_scenarios = self.current_feature and self.current_scenario...

Full Screen

Full Screen

main_clean_dataset.py

Source:main_clean_dataset.py Github

copy

Full Screen

1import pandas as pd2from DataCleaning.Alvira import alvira_cleaning3from DataCleaning.Arcus import arcus_cleaning4from DataCleaning.Diana import diana_cleaning5from DataCleaning.Drone import drone_cleaning6from DataCleaning.Venus import venus_cleaning7def run_clean_dataset(sensor, scenario):8 if sensor == 'Drone':9 if scenario != 'All' and scenario == '1_1':10 drone_data = pd.read_csv('Scenari/Scenario_1/Scenario_' + scenario + '/2020-09-29_14-10-56_v2.csv', delimiter=';')11 drone_data = drone_cleaning.cleaning_drone_dataset(drone_data, '1_1', False, False)12 else:13 drone_data_1_1 = pd.read_csv('Scenari/Scenario_1/Scenario_1_1/2020-09-29_14-10-56_v2.csv', delimiter=';')14 drone_data_1_2 = pd.read_csv('Scenari/Scenario_1/Scenario_1_2/2020-09-29_15-55-18_v2.csv', delimiter=',')15 drone_data_1_3 = pd.read_csv('Scenari/Scenario_1/Scenario_1_3/2020-09-29_15-18-15_v2.csv', delimiter=',')16 drone_data_1_4 = pd.read_csv('Scenari/Scenario_1/Scenario_1_4/2020-09-29_15-43-48_v2.csv', delimiter=',')17 drone_data_1_1 = drone_cleaning.cleaning_drone_dataset(drone_data_1_1, '1_1', False, False)18 drone_data_1_2 = drone_cleaning.cleaning_drone_dataset(drone_data_1_2, '1_2', False, False)19 drone_data_1_3 = drone_cleaning.cleaning_drone_dataset(drone_data_1_3, '1_3', True, False)20 drone_data_1_4 = drone_cleaning.cleaning_drone_dataset(drone_data_1_4, '1_4', False, False)21 if sensor == 'Alvira':22 if scenario != 'All':23 alvira_data = pd.read_csv('Scenari/Scenario_1/Scenario_' + scenario + '/ALVIRA_scenario.csv', delimiter=',')24 alvira_data = alvira_cleaning.cleaning_alvira_dataset(alvira_data, scenario, False, False)25 else:26 alvira_data_1_1 = pd.read_csv('Scenari/Scenario_1/Scenario_1_1/ALVIRA_scenario.csv', delimiter=',')27 alvira_data_1_2 = pd.read_csv('Scenari/Scenario_1/Scenario_1_2/ALVIRA_scenario.csv', delimiter=',')28 alvira_data_1_3 = pd.read_csv('Scenari/Scenario_1/Scenario_1_3/ALVIRA_scenario.csv', delimiter=',')29 alvira_data_1_4 = pd.read_csv('Scenari/Scenario_1/Scenario_1_4/ALVIRA_scenario.csv', delimiter=',')30 alvira_data_1_1 = alvira_cleaning.cleaning_alvira_dataset(alvira_data_1_1, '1_1', False, False)31 alvira_data_1_2 = alvira_cleaning.cleaning_alvira_dataset(alvira_data_1_2, '1_2', False, False)32 alvira_data_1_3 = alvira_cleaning.cleaning_alvira_dataset(alvira_data_1_3, '1_3', False, False)33 alvira_data_1_4 = alvira_cleaning.cleaning_alvira_dataset(alvira_data_1_4, '1_4', False, False)34 if sensor == 'Arcus':35 if scenario != 'All':36 arcs_data = pd.read_csv('Scenari/Scenario_1/Scenario_' + scenario + '/ARCUS_scenario.csv', delimiter=',')37 arcs_data = arcus_cleaning.cleaning_arcus_dataset(arcs_data, scenario, False, False)38 else:39 arcs_data_1_1 = pd.read_csv('Scenari/Scenario_1/Scenario_1_1/ARCUS_scenario.csv', delimiter=',')40 arcs_data_1_2 = pd.read_csv('Scenari/Scenario_1/Scenario_1_2/ARCUS_scenario.csv', delimiter=',')41 arcs_data_1_3 = pd.read_csv('Scenari/Scenario_1/Scenario_1_3/ARCUS_scenario.csv', delimiter=',')42 arcs_data_1_4 = pd.read_csv('Scenari/Scenario_1/Scenario_1_4/ARCUS_scenario.csv', delimiter=',')43 arcs_data_1_1 = arcus_cleaning.cleaning_arcus_dataset(arcs_data_1_1, '1_1', False, False)44 arcs_data_1_2 = arcus_cleaning.cleaning_arcus_dataset(arcs_data_1_2, '1_2', False, False)45 arcs_data_1_3 = arcus_cleaning.cleaning_arcus_dataset(arcs_data_1_3, '1_3', False, False)46 arcs_data_1_4 = arcus_cleaning.cleaning_arcus_dataset(arcs_data_1_4, '1_4', False, False)47 if sensor == 'Diana':48 if scenario != 'All':49 diana_data = pd.read_csv('Scenari/Scenario_1/Scenario' + scenario + '/DIANA_scenario.csv', delimiter=',')50 diana_data = diana_cleaning.cleaning_diana_dataset(diana_data, '1_1', False, False)51 else:52 diana_data_1_1 = pd.read_csv('Scenari/Scenario_1/Scenario_1_1/DIANA_scenario.csv', delimiter=',')53 diana_data_1_2 = pd.read_csv('Scenari/Scenario_1/Scenario_1_2/DIANA_scenario.csv', delimiter=',')54 diana_data_1_3 = pd.read_csv('Scenari/Scenario_1/Scenario_1_3/DIANA_scenario.csv', delimiter=',')55 diana_data_1_4 = pd.read_csv('Scenari/Scenario_1/Scenario_1_4/DIANA_scenario.csv', delimiter=',')56 diana_data_1_1 = diana_cleaning.cleaning_diana_dataset(diana_data_1_1, '1_1', False, False)57 diana_data_1_2 = diana_cleaning.cleaning_diana_dataset(diana_data_1_2, '1_2', False, False)58 diana_data_1_3 = diana_cleaning.cleaning_diana_dataset(diana_data_1_3, '1_3', False, False)59 diana_data_1_4 = diana_cleaning.cleaning_diana_dataset(diana_data_1_4, '1_4', False, False)60 if sensor == 'Venus':61 if scenario != 'All':62 venus_data = pd.read_csv('Scenari/Scenario_1/Scenario' + scenario + '/VENUS_scenario.csv', delimiter=',')63 venus_data = venus_cleaning.cleaning_venus_dataset(venus_data, '1_4', False, False)64 else:65 venus_data_1_1 = pd.read_csv('Scenari/Scenario_1/Scenario_1_1/VENUS_scenario.csv', delimiter=',')66 venus_data_1_2 = pd.read_csv('Scenari/Scenario_1/Scenario_1_2/VENUS_scenario.csv', delimiter=',')67 venus_data_1_3 = pd.read_csv('Scenari/Scenario_1/Scenario_1_3/VENUS_scenario.csv', delimiter=',')68 venus_data_1_4 = pd.read_csv('Scenari/Scenario_1/Scenario_1_4/VENUS_scenario.csv', delimiter=',')69 venus_data_1_1 = venus_cleaning.cleaning_venus_dataset(venus_data_1_1, '1_1', False, False)70 venus_data_1_2 = venus_cleaning.cleaning_venus_dataset(venus_data_1_2, '1_2', False, False)71 venus_data_1_3 = venus_cleaning.cleaning_venus_dataset(venus_data_1_3, '1_3', False, False)...

Full Screen

Full Screen

demand_forecast.py

Source:demand_forecast.py Github

copy

Full Screen

1"""2Defines the demand forecast Pipeline instance3NB: although the Operators output a context and data,4we would need too much refactoring to really make use of that;5moreover everything is handled by the Scenario (and file system),6so each Operator callable returns None as data7"""8from src.backtest.evaluate import Evaluation9from src.context.prediction_context import PredictionContext10from src.context.training_context import TrainingContext11from src.demand_forecast.demand_forecast import DemandForecast12from src.demand_forecast.processing.data_pipeline import DataPipeline13from src.services.filesystem.scenario import Scenario14from src.services.service_provider import ServiceProviderHandler15from .operators import Operator16from .pipeline import Pipeline17from .stages import Stage18SERVICE = ServiceProviderHandler()19# Training20def fetch_training_data(scenario=None, stage=None, context=None):21 """Callable to fetch the training data"""22 train_context = TrainingContext()23 SERVICE.log.info("\033[1mFetching training data\033[0m")24 DataPipeline.fetch_data(DemandForecast.input_data, scope="training", context=train_context, scenario=scenario)25 train_context.print_summary()26 return train_context27FETCH_TRAINING_DATA_OPERATOR = Operator(28 "Fetches training data",29 final_stage=Stage.TRAINING_FETCHED,30 python_callable=fetch_training_data,31)32def train_demand(scenario=None, stage=None, context=None):33 """Callable to train the DemandForecast model and save it"""34 assert isinstance(context, TrainingContext)35 SERVICE.log.info("\033[1mTraining demand model\033[0m")36 demand_forecast = DemandForecast()37 demand_forecast.fit(train_context=context, scenario=scenario)38 context.save(stage=context.file_name_stage, scenario=scenario)39 demand_forecast.save_cls(scenario=scenario)40 return context41TRAIN_DEMAND_OPERATOR = Operator(42 "Trains Demand",43 final_stage=Stage.TRAINING_TRAINED,44 python_callable=train_demand,45)46# Predictions47def fetch_prediction_data(scenario=None, stage=None, context=None):48 """Callable to fetch prediction data"""49 pred_context = PredictionContext()50 SERVICE.log.info("\033[1mFetching prediction data\033[0m")51 DataPipeline.fetch_data(DemandForecast.input_data, scope="prediction", context=context, scenario=scenario)52 pred_context.print_summary()53 return pred_context54FETCH_PREDICTION_DATA_OPERATOR = Operator(55 "Fetches prediction data",56 final_stage=Stage.PREDICTION_FETCHED,57 python_callable=fetch_prediction_data,58)59def predict_demand(scenario=None, stage=None, context: "PredictionContext" = None):60 """Callable to predict demand with trained model"""61 assert isinstance(context, PredictionContext)62 SERVICE.log.info("\033[1mPredicting demand\033[0m")63 demand_forecast = DemandForecast.load_cls(context=TrainingContext, scenario=scenario)64 predictions = demand_forecast.predict(prediction_context=context, scenario=scenario)65 demand_forecast.save_predictions(df=predictions, scenario=scenario)66 context.save(stage=context.file_name_stage, scenario=scenario)67 return context68PREDICT_DEMAND_OPERATOR = Operator(69 "Predicts demand",70 final_stage=Stage.PREDICTION_PREDICTED,71 python_callable=predict_demand,72)73# Evaluation of predictions74def fetch_backtest_data(scenario=None, stage=None, context: "PredictionContext" = None):75 """Callable to fetch backtest data"""76 src = scenario.relpath(path=PredictionContext.file_name, stage=Stage.PREDICTION_FETCHED)77 pred_context = PredictionContext.load(src=src)78 SERVICE.log.info("\033[1mFetching backtest data\033[0m")79 DataPipeline.fetch_data(Evaluation.input_data, scope="evaluation", context=context, scenario=scenario)80 return pred_context81FETCH_BACKTEST_DATA_OPERATOR = Operator(82 "Fetches backtesting data",83 final_stage=Stage.PREDICTION_BACKTESTINGFETCHED,84 python_callable=fetch_backtest_data,85)86def evaluate(scenario=None, stage=None, context=None):87 """Callable to evaluate prediction"""88 assert isinstance(context, PredictionContext)89 SERVICE.log.info("\033[1mEvaluating predictions\033[0m")90 evaluation = Evaluation(pred_context=context)91 evaluation.evaluate(scenario=scenario)92 return context93EVALUATE_OPERATOR = Operator(94 "Evaluates prediction",95 final_stage=Stage.PREDICTION_BACKTESTED,96 python_callable=evaluate,97)98class DemandForecastPipeline(Pipeline):99 """Pipeline to run demand forecast model training / prediction / evaluation100 Extension of the Pipeline class, with pre-defined operators101 """102 def __init__(103 self,104 scenario: "Scenario",105 scenario_test: "Scenario" = None,106 begin_stage: str = Stage.TRAINING_INIT,107 final_stage: str = Stage.PREDICTION_BACKTESTED,108 test: bool = False,109 ):110 operators = [111 FETCH_TRAINING_DATA_OPERATOR,112 TRAIN_DEMAND_OPERATOR,113 FETCH_PREDICTION_DATA_OPERATOR,114 PREDICT_DEMAND_OPERATOR,115 EVALUATE_OPERATOR,116 ]117 super(DemandForecastPipeline, self).__init__(118 scenario=scenario,119 scenario_test=scenario_test,120 begin_stage=begin_stage,121 final_stage=final_stage,122 test=test,123 operators=operators,...

Full Screen

Full Screen

summary.py

Source:summary.py Github

copy

Full Screen

...53 for scenario in feature:54 if isinstance(scenario, ScenarioOutline):55 self.process_scenario_outline(scenario)56 else:57 self.process_scenario(scenario)58 def end(self):59 # -- SHOW FAILED SCENARIOS (optional):60 if self.show_failed_scenarios and self.failed_scenarios:61 self.stream.write("\nFailing scenarios:\n")62 for scenario in self.failed_scenarios:63 self.stream.write(u" %s %s\n" % (64 scenario.location, scenario.name))65 self.stream.write("\n")66 # -- SHOW SUMMARY COUNTS:67 self.stream.write(format_summary("feature", self.feature_summary))68 self.stream.write(format_summary("scenario", self.scenario_summary))69 self.stream.write(format_summary("step", self.step_summary))70 timings = (int(self.duration / 60.0), self.duration % 60)71 self.stream.write('Took %dm%02.3fs\n' % timings)72 def process_scenario(self, scenario):73 if scenario.status == Status.failed:74 self.failed_scenarios.append(scenario)75 self.scenario_summary[scenario.status.name] += 176 for step in scenario:77 self.step_summary[step.status.name] += 178 def process_scenario_outline(self, scenario_outline):79 for scenario in scenario_outline.scenarios:...

Full Screen

Full Screen

test_formatter_rerun.py

Source:test_formatter_rerun.py Github

copy

Full Screen

...12 formatter_name = "rerun"13 def test_feature_with_two_passing_scenarios(self):14 p = self._formatter(_tf(), self.config)15 f = self._feature()16 scenarios = [ self._scenario(), self._scenario() ]17 for scenario in scenarios:18 f.add_scenario(scenario)19 # -- FORMATTER CALLBACKS:20 p.feature(f)21 for scenario in f.scenarios:22 p.scenario(scenario)23 assert scenario.status == Status.passed24 p.eof()25 eq_([], p.failed_scenarios)26 # -- EMIT REPORT:27 p.close()28 def test_feature_with_one_passing_one_failing_scenario(self):29 p = self._formatter(_tf(), self.config)30 f = self._feature()31 passing_scenario = self._scenario()32 failing_scenario = self._scenario()33 failing_scenario.steps.append(self._step())34 scenarios = [ passing_scenario, failing_scenario ]35 for scenario in scenarios:36 f.add_scenario(scenario)37 # -- FORMATTER CALLBACKS:38 p.feature(f)39 for scenario in f.scenarios:40 p.scenario(scenario)41 failing_scenario.steps[0].status = Status.failed42 assert scenarios[0].status == Status.passed43 assert scenarios[1].status == Status.failed44 p.eof()45 eq_([ failing_scenario ], p.failed_scenarios)46 # -- EMIT REPORT:47 p.close()48 def test_feature_with_one_passing_two_failing_scenario(self):49 p = self._formatter(_tf(), self.config)50 f = self._feature()51 passing_scenario = self._scenario()52 failing_scenario1 = self._scenario()53 failing_scenario1.steps.append(self._step())54 failing_scenario2 = self._scenario()55 failing_scenario2.steps.append(self._step())56 scenarios = [ failing_scenario1, passing_scenario, failing_scenario2 ]57 for scenario in scenarios:58 f.add_scenario(scenario)59 # -- FORMATTER CALLBACKS:60 p.feature(f)61 for scenario in f.scenarios:62 p.scenario(scenario)63 failing_scenario1.steps[0].status = Status.failed64 failing_scenario2.steps[0].status = Status.failed65 assert scenarios[0].status == Status.failed66 assert scenarios[1].status == Status.passed67 assert scenarios[2].status == Status.failed68 p.eof()69 eq_([ failing_scenario1, failing_scenario2 ], p.failed_scenarios)70 # -- EMIT REPORT:71 p.close()72class TestRerunAndPrettyFormatters(MultipleFormattersTest):73 formatters = ["rerun", "pretty"]74class TestRerunAndPlainFormatters(MultipleFormattersTest):75 formatters = ["rerun", "plain"]76class TestRerunAndScenarioProgressFormatters(MultipleFormattersTest):...

Full Screen

Full Screen

scenario_autoretry.py

Source:scenario_autoretry.py Github

copy

Full Screen

1# -*- coding: UTF -*-2# pylint: disable=line-too-long3"""4Provides support functionality to retry scenarios a number of times before5their failure is accepted. This functionality can be helpful when you use6behave tests in a unreliable server/network infrastructure.7EXAMPLE:8.. sourcecode:: gherkin9 # -- FILE: features/alice.feature10 # TAG: Feature or Scenario/ScenarioOutline with @autoretry11 # NOTE: If you tag the feature, all its scenarios are retried.12 @autoretry13 Feature: Use unreliable Server infrastructure14 Scenario: ...15.. sourcecode:: python16 # -- FILE: features/environment.py17 from behave.contrib.scenario_autoretry import patch_scenario_with_autoretry18 def before_feature(context, feature):19 for scenario in feature.scenarios:20 if "autoretry" in scenario.effective_tags:21 patch_scenario_with_autoretry(scenario, max_attempts=2)22.. seealso::23 * https://github.com/behave/behave/pull/32824 * https://github.com/hypothesis/smokey/blob/sauce-reliability/smokey/features/environment.py25"""26from __future__ import print_function27import functools28from behave.model import ScenarioOutline29def patch_scenario_with_autoretry(scenario, max_attempts=3):30 """Monkey-patches :func:`~behave.model.Scenario.run()` to auto-retry a31 scenario that fails. The scenario is retried a number of times32 before its failure is accepted.33 This is helpful when the test infrastructure (server/network environment)34 is unreliable (which should be a rare case).35 :param scenario: Scenario or ScenarioOutline to patch.36 :param max_attempts: How many times the scenario can be run.37 """38 def scenario_run_with_retries(scenario_run, *args, **kwargs):39 for attempt in range(1, max_attempts+1):40 if not scenario_run(*args, **kwargs):41 if attempt > 1:42 message = u"AUTO-RETRY SCENARIO PASSED (after {0} attempts)"43 print(message.format(attempt))44 return False # -- NOT-FAILED = PASSED45 # -- SCENARIO FAILED:46 if attempt < max_attempts:47 print(u"AUTO-RETRY SCENARIO (attempt {0})".format(attempt))48 message = u"AUTO-RETRY SCENARIO FAILED (after {0} attempts)"49 print(message.format(max_attempts))50 return True51 if isinstance(scenario, ScenarioOutline):52 scenario_outline = scenario53 for scenario in scenario_outline.scenarios:54 scenario_run = scenario.run55 scenario.run = functools.partial(scenario_run_with_retries, scenario_run)56 else:57 scenario_run = scenario.run...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const Stryker = require('stryker-parent').Stryker;2const StrykerConfigReader = require('stryker-parent').StrykerConfigReader;3let strykerConfig = new StrykerConfigReader().readConfig();4let stryker = new Stryker(strykerConfig);5stryker.runMutationTest();6module.exports = function (config) {7 config.set({8 mochaOptions: {9 }10 });11};

Full Screen

Using AI Code Generation

copy

Full Screen

1var scenario = require('stryker-parent').scenario;2scenario('test', function () {3 it('should pass', function () {4 expect(true).to.be.true;5 });6});7var scenario = require('stryker-parent').scenario;8scenario('test', function () {9 it('should pass', function () {10 expect(true).to.be.true;11 });12});13var scenario = require('stryker-parent').scenario;14scenario('test', function () {15 it('should pass', function () {16 expect(true).to.be.true;17 });18});19var scenario = require('stryker-parent').scenario;20scenario('test', function () {21 it('should pass', function () {22 expect(true).to.be.true;23 });24});25var scenario = require('stryker-parent').scenario;26scenario('test', function () {27 it('should pass', function () {28 expect(true).to.be.true;29 });30});31var scenario = require('stryker-parent').scenario;32scenario('test', function () {33 it('should pass', function () {34 expect(true).to.be.true;35 });36});37var scenario = require('stryker-parent').scenario;38scenario('test', function () {39 it('should pass', function () {40 expect(true).to.be.true;41 });42});43var scenario = require('stryker-parent').scenario;44scenario('test', function () {45 it('should pass', function () {46 expect(true).to.be.true;47 });48});49var scenario = require('stryker-parent').scenario;50scenario('test', function () {51 it('should pass', function () {52 expect(true).to.be.true;53 });54});

Full Screen

Using AI Code Generation

copy

Full Screen

1var parent = require('stryker-parent');2parent.scenario('test', function() {3});4var parent = require('stryker-parent');5parent.scenario('test2', function() {6});7var parent = require('stryker-parent');8parent.scenario('test3', function() {9});10var parent = require('stryker-parent');11parent.scenario('test4', function() {12});13var parent = require('stryker-parent');14parent.scenario('test5', function() {15});16var parent = require('stryker-parent');17parent.scenario('test6', function() {18});19var parent = require('stryker-parent');20parent.scenario('test7', function() {21});22var parent = require('stryker-parent');23parent.scenario('test8', function() {24});25var parent = require('stryker-parent');26parent.scenario('test9', function() {27});28var parent = require('stryker-parent');29parent.scenario('test10', function() {30});31var parent = require('stryker-parent');32parent.scenario('test11', function() {33});34var parent = require('stryker-parent');35parent.scenario('test12',

Full Screen

Using AI Code Generation

copy

Full Screen

1var scenario = require('stryker-parent').scenario;2scenario('scenario 1', function () {3});4scenario('scenario 2', function () {5});6var scenario = require('stryker-child').scenario;7scenario('scenario 1', function () {8});9scenario('scenario 2', function () {10});11Your name to display (optional):12Your name to display (optional):13var scenario = sandbox.require('stryker-parent').scenario;14scenario('scenario 1', function () {15});16scenario('scenario 2', function () {17});18var scenario = sandbox.require('stryker-child').scenario;19scenario('scenario 1', function () {20});21scenario('scenario 2', function () {22});23Your name to display (optional):

Full Screen

Using AI Code Generation

copy

Full Screen

1const { scenario } = require('stryker-parent');2scenario('test', () => {3 describe('test', () => {4 it('test', () => {5 expect(true).toBeTruthy();6 });7 });8});

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker-parent');2var scenario = stryker.scenario;3var test = require('tape');4test('test', function(t) {5 t.plan(1);6 t.equal(scenario('test'), 'test');7});8module.exports = function(config) {9 config.set({10 });11};12module.exports = function(config) {13 config.set({14 });15};

Full Screen

Using AI Code Generation

copy

Full Screen

1const { scenario } = require('stryker-parent');2scenario('Stryker should work', () => {3});4module.exports = function (config) {5 config.set({6 jest: {7 config: require('./jest.config.js'),8 }9 });10};11const { scenario } = require('stryker-parent');12scenario('Stryker should work', () => {13});14module.exports = function (config) {15 config.set({16 jest: {17 config: require('./jest.config.js'),18 }19 });20};

Full Screen

Using AI Code Generation

copy

Full Screen

1var scenario = require('stryker-parent').scenario;2var assert = require('assert');3var expect = require('chai').expect;4var should = require('chai').should();5describe('test', function() {6 it('should pass', function() {7 expect(true).to.be.true;8 });9});10scenario("test", "test.js", "should pass", function() {11 var a = 1;12 var b = 2;13 var c = a + b;14 expect(c).to.equal(3);15});16 1 passing (13ms)17 1 passing (13ms)

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 stryker-parent 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