robotframework 6.1rc1__zip → 7.0a1__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework-6.1rc1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/interfaces.py +36 -49
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/control.py +155 -85
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modelobject.py +2 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testsuite.py +43 -24
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/run.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +210 -220
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +15 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +15 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/model.py +156 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +35 -39
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1rc1/src/robot/model/keyword.py +0 -173
- robotframework-6.1rc1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1rc1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1rc1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1rc1/src/robot/output/listeners.py +0 -174
- robotframework-6.1rc1/src/robot/output/output.py +0 -95
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
# Copyright 2008-2015 Nokia Networks
|
|
2
|
+
# Copyright 2016- Robot Framework Foundation
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
import os.path
|
|
17
|
+
|
|
18
|
+
from robot.errors import DataError, TimeoutError
|
|
19
|
+
from robot.model import BodyItem
|
|
20
|
+
from robot.utils import (get_error_details, Importer, safe_str,
|
|
21
|
+
split_args_from_name_or_path, type_name)
|
|
22
|
+
|
|
23
|
+
from .loggerapi import LoggerApi
|
|
24
|
+
from .loggerhelper import IsLogged
|
|
25
|
+
from .logger import LOGGER
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Listeners(LoggerApi):
|
|
29
|
+
_listeners: 'list[ListenerFacade]'
|
|
30
|
+
|
|
31
|
+
def __init__(self, listeners=(), log_level='INFO'):
|
|
32
|
+
self._is_logged = IsLogged(log_level)
|
|
33
|
+
self._listeners = import_listeners(listeners) if listeners else []
|
|
34
|
+
|
|
35
|
+
# Must be property to allow LibraryListeners to override it.
|
|
36
|
+
@property
|
|
37
|
+
def listeners(self):
|
|
38
|
+
return self._listeners
|
|
39
|
+
|
|
40
|
+
def start_suite(self, data, result):
|
|
41
|
+
for listener in self.listeners:
|
|
42
|
+
listener.start_suite(data, result)
|
|
43
|
+
|
|
44
|
+
def end_suite(self, data, result):
|
|
45
|
+
for listener in self.listeners:
|
|
46
|
+
listener.end_suite(data, result)
|
|
47
|
+
|
|
48
|
+
def start_test(self, data, result):
|
|
49
|
+
for listener in self.listeners:
|
|
50
|
+
listener.start_test(data, result)
|
|
51
|
+
|
|
52
|
+
def end_test(self, data, result):
|
|
53
|
+
for listener in self.listeners:
|
|
54
|
+
listener.end_test(data, result)
|
|
55
|
+
|
|
56
|
+
def start_keyword(self, data, result):
|
|
57
|
+
for listener in self.listeners:
|
|
58
|
+
listener.start_keyword(data, result)
|
|
59
|
+
|
|
60
|
+
def end_keyword(self, data, result):
|
|
61
|
+
for listener in self.listeners:
|
|
62
|
+
listener.end_keyword(data, result)
|
|
63
|
+
|
|
64
|
+
def start_for(self, data, result):
|
|
65
|
+
for listener in self.listeners:
|
|
66
|
+
listener.start_for(data, result)
|
|
67
|
+
|
|
68
|
+
def end_for(self, data, result):
|
|
69
|
+
for listener in self.listeners:
|
|
70
|
+
listener.end_for(data, result)
|
|
71
|
+
|
|
72
|
+
def start_for_iteration(self, data, result):
|
|
73
|
+
for listener in self.listeners:
|
|
74
|
+
listener.start_for_iteration(data, result)
|
|
75
|
+
|
|
76
|
+
def end_for_iteration(self, data, result):
|
|
77
|
+
for listener in self.listeners:
|
|
78
|
+
listener.end_for_iteration(data, result)
|
|
79
|
+
|
|
80
|
+
def start_while(self, data, result):
|
|
81
|
+
for listener in self.listeners:
|
|
82
|
+
listener.start_while(data, result)
|
|
83
|
+
|
|
84
|
+
def end_while(self, data, result):
|
|
85
|
+
for listener in self.listeners:
|
|
86
|
+
listener.end_while(data, result)
|
|
87
|
+
|
|
88
|
+
def start_while_iteration(self, data, result):
|
|
89
|
+
for listener in self.listeners:
|
|
90
|
+
listener.start_while_iteration(data, result)
|
|
91
|
+
|
|
92
|
+
def end_while_iteration(self, data, result):
|
|
93
|
+
for listener in self.listeners:
|
|
94
|
+
listener.end_while_iteration(data, result)
|
|
95
|
+
|
|
96
|
+
def start_if_branch(self, data, result):
|
|
97
|
+
for listener in self.listeners:
|
|
98
|
+
listener.start_if_branch(data, result)
|
|
99
|
+
|
|
100
|
+
def end_if_branch(self, data, result):
|
|
101
|
+
for listener in self.listeners:
|
|
102
|
+
listener.end_if_branch(data, result)
|
|
103
|
+
|
|
104
|
+
def start_try_branch(self, data, result):
|
|
105
|
+
for listener in self.listeners:
|
|
106
|
+
listener.start_try_branch(data, result)
|
|
107
|
+
|
|
108
|
+
def end_try_branch(self, data, result):
|
|
109
|
+
for listener in self.listeners:
|
|
110
|
+
listener.end_try_branch(data, result)
|
|
111
|
+
|
|
112
|
+
def start_return(self, data, result):
|
|
113
|
+
for listener in self.listeners:
|
|
114
|
+
listener.start_return(data, result)
|
|
115
|
+
|
|
116
|
+
def end_return(self, data, result):
|
|
117
|
+
for listener in self.listeners:
|
|
118
|
+
listener.end_return(data, result)
|
|
119
|
+
|
|
120
|
+
def start_continue(self, data, result):
|
|
121
|
+
for listener in self.listeners:
|
|
122
|
+
listener.start_continue(data, result)
|
|
123
|
+
|
|
124
|
+
def end_continue(self, data, result):
|
|
125
|
+
for listener in self.listeners:
|
|
126
|
+
listener.end_continue(data, result)
|
|
127
|
+
|
|
128
|
+
def start_break(self, data, result):
|
|
129
|
+
for listener in self.listeners:
|
|
130
|
+
listener.start_break(data, result)
|
|
131
|
+
|
|
132
|
+
def end_break(self, data, result):
|
|
133
|
+
for listener in self.listeners:
|
|
134
|
+
listener.end_break(data, result)
|
|
135
|
+
|
|
136
|
+
def start_error(self, data, result):
|
|
137
|
+
for listener in self.listeners:
|
|
138
|
+
listener.start_error(data, result)
|
|
139
|
+
|
|
140
|
+
def end_error(self, data, result):
|
|
141
|
+
for listener in self.listeners:
|
|
142
|
+
listener.end_error(data, result)
|
|
143
|
+
|
|
144
|
+
def start_var(self, data, result):
|
|
145
|
+
for listener in self.listeners:
|
|
146
|
+
listener.start_var(data, result)
|
|
147
|
+
|
|
148
|
+
def end_var(self, data, result):
|
|
149
|
+
for listener in self.listeners:
|
|
150
|
+
listener.end_var(data, result)
|
|
151
|
+
|
|
152
|
+
def set_log_level(self, level):
|
|
153
|
+
self._is_logged.set_level(level)
|
|
154
|
+
|
|
155
|
+
def log_message(self, message):
|
|
156
|
+
if self._is_logged(message.level):
|
|
157
|
+
for listener in self.listeners:
|
|
158
|
+
listener.log_message(message)
|
|
159
|
+
|
|
160
|
+
def message(self, message):
|
|
161
|
+
for listener in self.listeners:
|
|
162
|
+
listener.message(message)
|
|
163
|
+
|
|
164
|
+
def imported(self, import_type, name, attrs):
|
|
165
|
+
for listener in self.listeners:
|
|
166
|
+
listener.imported(import_type, name, attrs)
|
|
167
|
+
|
|
168
|
+
def output_file(self, file_type, path):
|
|
169
|
+
for listener in self.listeners:
|
|
170
|
+
listener.output_file(file_type, path)
|
|
171
|
+
|
|
172
|
+
def close(self):
|
|
173
|
+
for listener in self.listeners:
|
|
174
|
+
listener.close()
|
|
175
|
+
|
|
176
|
+
def __bool__(self):
|
|
177
|
+
return bool(self.listeners)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class LibraryListeners(Listeners):
|
|
181
|
+
_listeners: 'list[list[ListenerFacade]]'
|
|
182
|
+
|
|
183
|
+
def __init__(self, log_level='INFO'):
|
|
184
|
+
super().__init__(log_level=log_level)
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def listeners(self):
|
|
188
|
+
return self._listeners[-1] if self._listeners else []
|
|
189
|
+
|
|
190
|
+
def new_suite_scope(self):
|
|
191
|
+
self._listeners.append([])
|
|
192
|
+
|
|
193
|
+
def discard_suite_scope(self):
|
|
194
|
+
self._listeners.pop()
|
|
195
|
+
|
|
196
|
+
def register(self, listeners, library):
|
|
197
|
+
listeners = import_listeners(listeners, library=library)
|
|
198
|
+
self._listeners[-1].extend(listeners)
|
|
199
|
+
|
|
200
|
+
def close(self):
|
|
201
|
+
pass
|
|
202
|
+
|
|
203
|
+
def unregister(self, library, close=False):
|
|
204
|
+
remaining = []
|
|
205
|
+
for listener in self._listeners[-1]:
|
|
206
|
+
if listener.library is not library:
|
|
207
|
+
remaining.append(listener)
|
|
208
|
+
elif close:
|
|
209
|
+
listener.close()
|
|
210
|
+
self._listeners[-1] = remaining
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
class ListenerFacade(LoggerApi):
|
|
214
|
+
|
|
215
|
+
def __init__(self, listener, name, library=None):
|
|
216
|
+
self.listener = listener
|
|
217
|
+
self.name = name
|
|
218
|
+
self.library = library
|
|
219
|
+
self._start_suite = self._get_method(listener, 'start_suite')
|
|
220
|
+
self._end_suite = self._get_method(listener, 'end_suite')
|
|
221
|
+
self._start_test = self._get_method(listener, 'start_test')
|
|
222
|
+
self._end_test = self._get_method(listener, 'end_test')
|
|
223
|
+
self._log_message = self._get_method(listener, 'log_message')
|
|
224
|
+
self._message = self._get_method(listener, 'message')
|
|
225
|
+
self._close = self._get_method(listener, 'close')
|
|
226
|
+
|
|
227
|
+
def start_suite(self, data, result):
|
|
228
|
+
self._start_suite(data, result)
|
|
229
|
+
|
|
230
|
+
def end_suite(self, data, result):
|
|
231
|
+
self._end_suite(data, result)
|
|
232
|
+
|
|
233
|
+
def start_test(self, data, result):
|
|
234
|
+
self._start_test(data, result)
|
|
235
|
+
|
|
236
|
+
def end_test(self, data, result):
|
|
237
|
+
self._end_test(data, result)
|
|
238
|
+
|
|
239
|
+
def log_message(self, message):
|
|
240
|
+
self._log_message(message)
|
|
241
|
+
|
|
242
|
+
def message(self, message):
|
|
243
|
+
self._message(message)
|
|
244
|
+
|
|
245
|
+
def output_file(self, type_: str, path: str):
|
|
246
|
+
method = self._get_method(self.listener, f'{type_.lower()}_file')
|
|
247
|
+
method(path)
|
|
248
|
+
|
|
249
|
+
def close(self):
|
|
250
|
+
self._close()
|
|
251
|
+
|
|
252
|
+
def _get_method(self, listener, name):
|
|
253
|
+
for method_name in self._get_method_names(name):
|
|
254
|
+
if hasattr(listener, method_name):
|
|
255
|
+
return ListenerMethod(getattr(listener, method_name), self.name)
|
|
256
|
+
return ListenerMethod(None, self.name)
|
|
257
|
+
|
|
258
|
+
def _get_method_names(self, name):
|
|
259
|
+
names = [name, self._to_camelCase(name)] if '_' in name else [name]
|
|
260
|
+
if self.library is not None:
|
|
261
|
+
names += ['_' + name for name in names]
|
|
262
|
+
return names
|
|
263
|
+
|
|
264
|
+
def _to_camelCase(self, name):
|
|
265
|
+
first, *rest = name.split('_')
|
|
266
|
+
return ''.join([first] + [part.capitalize() for part in rest])
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class ListenerV2Facade(ListenerFacade):
|
|
270
|
+
|
|
271
|
+
def __init__(self, listener, name, library=None):
|
|
272
|
+
super().__init__(listener, name, library)
|
|
273
|
+
self._start_kw = self._get_method(listener, 'start_keyword')
|
|
274
|
+
self._end_kw = self._get_method(listener, 'end_keyword')
|
|
275
|
+
|
|
276
|
+
def imported(self, import_type: str, name: str, attrs):
|
|
277
|
+
method = self._get_method(self.listener, f'{import_type.lower()}_import')
|
|
278
|
+
method(name, attrs)
|
|
279
|
+
|
|
280
|
+
def start_suite(self, data, result):
|
|
281
|
+
self._start_suite(result.name, self._suite_attrs(data, result))
|
|
282
|
+
|
|
283
|
+
def end_suite(self, data, result):
|
|
284
|
+
self._end_suite(result.name, self._suite_attrs(data, result, end=True))
|
|
285
|
+
|
|
286
|
+
def start_test(self, data, result):
|
|
287
|
+
self._start_test(result.name, self._test_attrs(data, result))
|
|
288
|
+
|
|
289
|
+
def end_test(self, data, result):
|
|
290
|
+
self._end_test(result.name, self._test_attrs(data, result, end=True))
|
|
291
|
+
|
|
292
|
+
def start_keyword(self, data, result):
|
|
293
|
+
self._start_kw(result.full_name, self._keyword_attrs(data, result))
|
|
294
|
+
|
|
295
|
+
def end_keyword(self, data, result):
|
|
296
|
+
self._end_kw(result.full_name,
|
|
297
|
+
self._keyword_attrs(data, result, end=True))
|
|
298
|
+
|
|
299
|
+
def start_for(self, data, result):
|
|
300
|
+
extra = self._for_extra_attrs(result)
|
|
301
|
+
self._start_kw(result._log_name, self._attrs(data, result, **extra))
|
|
302
|
+
|
|
303
|
+
def end_for(self, data, result):
|
|
304
|
+
extra = self._for_extra_attrs(result)
|
|
305
|
+
self._end_kw(result._log_name, self._attrs(data, result, **extra, end=True))
|
|
306
|
+
|
|
307
|
+
def _for_extra_attrs(self, result):
|
|
308
|
+
extra = {
|
|
309
|
+
'variables': list(result.assign),
|
|
310
|
+
'flavor': result.flavor or '',
|
|
311
|
+
'values': list(result.values)
|
|
312
|
+
}
|
|
313
|
+
if result.flavor == 'IN ENUMERATE':
|
|
314
|
+
extra['start'] = result.start
|
|
315
|
+
elif result.flavor == 'IN ZIP':
|
|
316
|
+
extra['fill'] = result.fill
|
|
317
|
+
extra['mode'] = result.mode
|
|
318
|
+
return extra
|
|
319
|
+
|
|
320
|
+
def start_for_iteration(self, data, result):
|
|
321
|
+
attrs = self._attrs(data, result, variables=dict(result.assign))
|
|
322
|
+
self._start_kw(result._log_name, attrs)
|
|
323
|
+
|
|
324
|
+
def end_for_iteration(self, data, result):
|
|
325
|
+
attrs = self._attrs(data, result, variables=dict(result.assign), end=True)
|
|
326
|
+
self._end_kw(result._log_name, attrs)
|
|
327
|
+
|
|
328
|
+
def start_while(self, data, result):
|
|
329
|
+
attrs = self._attrs(data, result, condition=result.condition,
|
|
330
|
+
limit=result.limit, on_limit=result.on_limit,
|
|
331
|
+
on_limit_message=result.on_limit_message)
|
|
332
|
+
self._start_kw(result._log_name, attrs)
|
|
333
|
+
|
|
334
|
+
def end_while(self, data, result):
|
|
335
|
+
attrs = self._attrs(data, result, condition=result.condition,
|
|
336
|
+
limit=result.limit, on_limit=result.on_limit,
|
|
337
|
+
on_limit_message=result.on_limit_message, end=True)
|
|
338
|
+
self._end_kw(result._log_name, attrs)
|
|
339
|
+
|
|
340
|
+
def start_while_iteration(self, data, result):
|
|
341
|
+
self._start_kw(result._log_name, self._attrs(data, result))
|
|
342
|
+
|
|
343
|
+
def end_while_iteration(self, data, result):
|
|
344
|
+
self._end_kw(result._log_name, self._attrs(data, result, end=True))
|
|
345
|
+
|
|
346
|
+
def start_if_branch(self, data, result):
|
|
347
|
+
extra = {'condition': result.condition} if result.type != result.ELSE else {}
|
|
348
|
+
self._start_kw(result._log_name, self._attrs(data, result, **extra))
|
|
349
|
+
|
|
350
|
+
def end_if_branch(self, data, result):
|
|
351
|
+
extra = {'condition': result.condition} if result.type != result.ELSE else {}
|
|
352
|
+
self._end_kw(result._log_name, self._attrs(data, result, **extra, end=True))
|
|
353
|
+
|
|
354
|
+
def start_try_branch(self, data, result):
|
|
355
|
+
extra = self._try_extra_attrs(result)
|
|
356
|
+
self._start_kw(result._log_name, self._attrs(data, result, **extra))
|
|
357
|
+
|
|
358
|
+
def end_try_branch(self, data, result):
|
|
359
|
+
extra = self._try_extra_attrs(result)
|
|
360
|
+
self._end_kw(result._log_name, self._attrs(data, result, **extra, end=True))
|
|
361
|
+
|
|
362
|
+
def _try_extra_attrs(self, result):
|
|
363
|
+
if result.type == BodyItem.EXCEPT:
|
|
364
|
+
return {
|
|
365
|
+
'patterns': list(result.patterns),
|
|
366
|
+
'pattern_type': result.pattern_type,
|
|
367
|
+
'variable': result.assign
|
|
368
|
+
}
|
|
369
|
+
return {}
|
|
370
|
+
|
|
371
|
+
def start_return(self, data, result):
|
|
372
|
+
attrs = self._attrs(data, result, values=list(result.values))
|
|
373
|
+
self._start_kw(result._log_name, attrs)
|
|
374
|
+
|
|
375
|
+
def end_return(self, data, result):
|
|
376
|
+
attrs = self._attrs(data, result, values=list(result.values), end=True)
|
|
377
|
+
self._end_kw(result._log_name, attrs)
|
|
378
|
+
|
|
379
|
+
def start_continue(self, data, result):
|
|
380
|
+
self._start_kw(result._log_name, self._attrs(data, result))
|
|
381
|
+
|
|
382
|
+
def end_continue(self, data, result):
|
|
383
|
+
self._end_kw(result._log_name, self._attrs(data, result, end=True))
|
|
384
|
+
|
|
385
|
+
def start_break(self, data, result):
|
|
386
|
+
self._start_kw(result._log_name, self._attrs(data, result))
|
|
387
|
+
|
|
388
|
+
def end_break(self, data, result):
|
|
389
|
+
self._end_kw(result._log_name, self._attrs(data, result, end=True))
|
|
390
|
+
|
|
391
|
+
def start_error(self, data, result):
|
|
392
|
+
self._start_kw(result._log_name, self._attrs(data, result))
|
|
393
|
+
|
|
394
|
+
def end_error(self, data, result):
|
|
395
|
+
self._end_kw(result._log_name, self._attrs(data, result, end=True))
|
|
396
|
+
|
|
397
|
+
def start_var(self, data, result):
|
|
398
|
+
extra = self._var_extra_attrs(result)
|
|
399
|
+
self._start_kw(result._log_name, self._attrs(data, result, **extra))
|
|
400
|
+
|
|
401
|
+
def end_var(self, data, result):
|
|
402
|
+
extra = self._var_extra_attrs(result)
|
|
403
|
+
self._end_kw(result._log_name, self._attrs(data, result, **extra, end=True))
|
|
404
|
+
|
|
405
|
+
def _var_extra_attrs(self, result):
|
|
406
|
+
if result.name.startswith('$'):
|
|
407
|
+
value = (result.separator or ' ').join(result.value)
|
|
408
|
+
else:
|
|
409
|
+
value = list(result.value)
|
|
410
|
+
return {'name': result.name, 'value': value, 'scope': result.scope or 'LOCAL'}
|
|
411
|
+
|
|
412
|
+
def log_message(self, message):
|
|
413
|
+
self._log_message(self._message_attributes(message))
|
|
414
|
+
|
|
415
|
+
def message(self, message):
|
|
416
|
+
self._message(self._message_attributes(message))
|
|
417
|
+
|
|
418
|
+
def _suite_attrs(self, data, result, end=False):
|
|
419
|
+
attrs = {
|
|
420
|
+
'id': data.id,
|
|
421
|
+
'doc': result.doc,
|
|
422
|
+
'metadata': dict(result.metadata),
|
|
423
|
+
'starttime': result.starttime,
|
|
424
|
+
'longname': result.full_name,
|
|
425
|
+
'tests': [t.name for t in data.tests],
|
|
426
|
+
'suites': [s.name for s in data.suites],
|
|
427
|
+
'totaltests': data.test_count,
|
|
428
|
+
'source': str(data.source or '')
|
|
429
|
+
}
|
|
430
|
+
if end:
|
|
431
|
+
attrs.update({
|
|
432
|
+
'endtime': result.endtime,
|
|
433
|
+
'elapsedtime': result.elapsedtime,
|
|
434
|
+
'status': result.status,
|
|
435
|
+
'message': result.message,
|
|
436
|
+
'statistics': result.stat_message
|
|
437
|
+
})
|
|
438
|
+
return attrs
|
|
439
|
+
|
|
440
|
+
def _test_attrs(self, data, result, end=False):
|
|
441
|
+
attrs = {
|
|
442
|
+
'id': data.id,
|
|
443
|
+
'doc': result.doc,
|
|
444
|
+
'tags': list(result.tags),
|
|
445
|
+
'lineno': data.lineno,
|
|
446
|
+
'starttime': result.starttime,
|
|
447
|
+
'longname': result.full_name,
|
|
448
|
+
'source': str(data.source or ''),
|
|
449
|
+
'template': data.template or '',
|
|
450
|
+
'originalname': data.name
|
|
451
|
+
}
|
|
452
|
+
if end:
|
|
453
|
+
attrs.update({
|
|
454
|
+
'endtime': result.endtime,
|
|
455
|
+
'elapsedtime': result.elapsedtime,
|
|
456
|
+
'status': result.status,
|
|
457
|
+
'message': result.message,
|
|
458
|
+
})
|
|
459
|
+
return attrs
|
|
460
|
+
|
|
461
|
+
def _keyword_attrs(self, data, result, end=False):
|
|
462
|
+
attrs = {
|
|
463
|
+
'doc': result.doc,
|
|
464
|
+
'lineno': data.lineno,
|
|
465
|
+
'type': result.type,
|
|
466
|
+
'status': result.status,
|
|
467
|
+
'starttime': result.starttime,
|
|
468
|
+
'source': str(data.source or ''),
|
|
469
|
+
'kwname': result.name or '',
|
|
470
|
+
'libname': result.owner or '',
|
|
471
|
+
'args': [a if isinstance(a, str) else safe_str(a) for a in result.args],
|
|
472
|
+
'assign': list(result.assign),
|
|
473
|
+
'tags': list(result.tags)
|
|
474
|
+
}
|
|
475
|
+
if end:
|
|
476
|
+
attrs.update({
|
|
477
|
+
'endtime': result.endtime,
|
|
478
|
+
'elapsedtime': result.elapsedtime
|
|
479
|
+
})
|
|
480
|
+
return attrs
|
|
481
|
+
|
|
482
|
+
def _attrs(self, data, result, end=False, **extra):
|
|
483
|
+
attrs = {
|
|
484
|
+
'doc': '',
|
|
485
|
+
'lineno': data.lineno,
|
|
486
|
+
'type': result.type,
|
|
487
|
+
'status': result.status,
|
|
488
|
+
'starttime': result.starttime,
|
|
489
|
+
'source': str(data.source or ''),
|
|
490
|
+
'kwname': result._log_name,
|
|
491
|
+
'libname': '',
|
|
492
|
+
'args': [],
|
|
493
|
+
'assign': [],
|
|
494
|
+
'tags': []
|
|
495
|
+
}
|
|
496
|
+
attrs.update(**extra)
|
|
497
|
+
if end:
|
|
498
|
+
attrs.update({
|
|
499
|
+
'endtime': result.endtime,
|
|
500
|
+
'elapsedtime': result.elapsedtime
|
|
501
|
+
})
|
|
502
|
+
return attrs
|
|
503
|
+
|
|
504
|
+
def _message_attributes(self, msg):
|
|
505
|
+
# Timestamp in our legacy format.
|
|
506
|
+
timestamp = msg.timestamp.isoformat(' ', timespec='milliseconds').replace('-', '')
|
|
507
|
+
attrs = {'timestamp': timestamp,
|
|
508
|
+
'message': msg.message,
|
|
509
|
+
'level': msg.level,
|
|
510
|
+
'html': 'yes' if msg.html else 'no'}
|
|
511
|
+
return attrs
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def import_listener(listener):
|
|
515
|
+
if not isinstance(listener, str):
|
|
516
|
+
# Modules have `__name__`, with others better to use `type_name`.
|
|
517
|
+
name = getattr(listener, '__name__', None) or type_name(listener)
|
|
518
|
+
return listener, name
|
|
519
|
+
name, args = split_args_from_name_or_path(listener)
|
|
520
|
+
importer = Importer('listener', logger=LOGGER)
|
|
521
|
+
listener = importer.import_class_or_module(os.path.normpath(name),
|
|
522
|
+
instantiate_with_args=args)
|
|
523
|
+
return listener, name
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
def get_version(listener, name):
|
|
527
|
+
try:
|
|
528
|
+
version = int(listener.ROBOT_LISTENER_API_VERSION)
|
|
529
|
+
if version not in (2, 3):
|
|
530
|
+
raise ValueError
|
|
531
|
+
except AttributeError:
|
|
532
|
+
raise DataError(f"Listener '{name}' does not have mandatory "
|
|
533
|
+
f"'ROBOT_LISTENER_API_VERSION' attribute.")
|
|
534
|
+
except (ValueError, TypeError):
|
|
535
|
+
raise DataError(f"Listener '{name}' uses unsupported API version "
|
|
536
|
+
f"'{listener.ROBOT_LISTENER_API_VERSION}'.")
|
|
537
|
+
return version
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
def import_listeners(listeners, library=None):
|
|
541
|
+
imported = []
|
|
542
|
+
for listener_source in listeners:
|
|
543
|
+
try:
|
|
544
|
+
listener, name = import_listener(listener_source)
|
|
545
|
+
version = get_version(listener, name)
|
|
546
|
+
if version == 2:
|
|
547
|
+
imported.append(ListenerV2Facade(listener, name, library))
|
|
548
|
+
else:
|
|
549
|
+
imported.append(ListenerFacade(listener, name, library))
|
|
550
|
+
except DataError as err:
|
|
551
|
+
name = listener_source \
|
|
552
|
+
if isinstance(listener_source, str) else type_name(listener_source)
|
|
553
|
+
msg = f"Taking listener '{name}' into use failed: {err}"
|
|
554
|
+
if library:
|
|
555
|
+
raise DataError(msg)
|
|
556
|
+
LOGGER.error(msg)
|
|
557
|
+
return imported
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class ListenerMethod:
|
|
561
|
+
# Flag to avoid recursive listener calls.
|
|
562
|
+
called = False
|
|
563
|
+
|
|
564
|
+
def __init__(self, method, name):
|
|
565
|
+
self.method = method
|
|
566
|
+
self.listener_name = name
|
|
567
|
+
|
|
568
|
+
def __call__(self, *args):
|
|
569
|
+
if self.method is None:
|
|
570
|
+
return
|
|
571
|
+
if self.called:
|
|
572
|
+
return
|
|
573
|
+
try:
|
|
574
|
+
ListenerMethod.called = True
|
|
575
|
+
self.method(*args)
|
|
576
|
+
except TimeoutError:
|
|
577
|
+
# Propagate possible timeouts:
|
|
578
|
+
# https://github.com/robotframework/robotframework/issues/2763
|
|
579
|
+
raise
|
|
580
|
+
except Exception:
|
|
581
|
+
message, details = get_error_details()
|
|
582
|
+
LOGGER.error(f"Calling method '{self.method.__name__}' of listener "
|
|
583
|
+
f"'{self.listener_name}' failed: {message}")
|
|
584
|
+
LOGGER.info(f"Details:\n{details}")
|
|
585
|
+
finally:
|
|
586
|
+
ListenerMethod.called = False
|