robotframework 6.1rc1__zip → 7.0__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 → robotframework-7.0}/INSTALL.rst +25 -25
- {robotframework-6.1rc1 → robotframework-7.0}/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/README.rst +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/setup.py +3 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/__init__.py +4 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/deco.py +60 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/exceptions.py +6 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/interfaces.py +403 -68
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/logger.py +27 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/parsing.py +4 -2
- robotframework-7.0/src/robot/api/py.typed +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/settings.py +21 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/storage.js +11 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/htmlfilewriter.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.css +10 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.html +10 -0
- robotframework-7.0/src/robot/htmldata/rebot/common.css +362 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/doc_formatting.css +13 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.css +51 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.html +14 -23
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.css +83 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.html +22 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/view.js +84 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonbuilder.py +38 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/model.py +21 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/robotbuilder.py +50 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/standardtypes.py +9 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlbuilder.py +35 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlwriter.py +18 -38
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/BuiltIn.py +255 -205
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Collections.py +384 -240
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/DateTime.py +73 -60
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/OperatingSystem.py +6 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/String.py +66 -76
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/XML.py +66 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/__init__.py +5 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/body.py +44 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/control.py +230 -88
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/filter.py +31 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/itemlist.py +9 -8
- robotframework-7.0/src/robot/model/keyword.py +77 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modelobject.py +27 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testcase.py +15 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testsuite.py +44 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/visitor.py +35 -8
- robotframework-7.0/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/verbose.py +61 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/debugfile.py +39 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/filelogger.py +18 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/librarylogger.py +3 -2
- robotframework-7.0/src/robot/output/listeners.py +753 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/logger.py +216 -80
- robotframework-7.0/src/robot/output/loggerapi.py +215 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0/src/robot/output/output.py +185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/stdoutlogsplitter.py +8 -5
- robotframework-7.0/src/robot/output/xmllogger.py +459 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/statements.py +193 -94
- robotframework-7.0/src/robot/parsing/model/visitor.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/rebot.py +2 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/logreportwriters.py +16 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/outputwriter.py +18 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/resultwriter.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/stringcache.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionresult.py +56 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/flattenkeywordmatcher.py +48 -9
- robotframework-7.0/src/robot/result/keywordremover.py +207 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/merger.py +1 -1
- robotframework-7.0/src/robot/result/model.py +1185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/resultbuilder.py +46 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/xmlelementhandlers.py +83 -43
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/run.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/__init__.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/__init__.py +2 -1
- robotframework-7.0/src/robot/running/arguments/argumentconverter.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentmapper.py +26 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentparser.py +85 -61
- robotframework-7.0/src/robot/running/arguments/argumentresolver.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentspec.py +83 -116
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentvalidator.py +33 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/customconverters.py +15 -12
- robotframework-7.0/src/robot/running/arguments/embedded.py +145 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/typeconverters.py +268 -220
- robotframework-7.0/src/robot/running/arguments/typeinfo.py +317 -0
- robotframework-7.0/src/robot/running/arguments/typeinfoparser.py +219 -0
- robotframework-7.0/src/robot/running/arguments/typevalidator.py +60 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/bodyrunner.py +147 -129
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/builders.py +17 -26
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/parsers.py +17 -11
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/settings.py +9 -17
- robotframework-7.0/src/robot/running/builder/transformers.py +535 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/context.py +113 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/dynamicmethods.py +62 -34
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/importer.py +27 -49
- robotframework-7.0/src/robot/running/invalidkeyword.py +67 -0
- robotframework-7.0/src/robot/running/keywordfinder.py +91 -0
- robotframework-7.0/src/robot/running/keywordimplementation.py +164 -0
- robotframework-7.0/src/robot/running/librarykeyword.py +392 -0
- robotframework-7.0/src/robot/running/librarykeywordrunner.py +250 -0
- robotframework-7.0/src/robot/running/libraryscopes.py +115 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/model.py +198 -337
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/namespace.py +124 -137
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/outputcapture.py +20 -12
- robotframework-7.0/src/robot/running/resourcemodel.py +448 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/statusreporter.py +16 -13
- robotframework-7.0/src/robot/running/suiterunner.py +265 -0
- robotframework-7.0/src/robot/running/testlibraries.py +500 -0
- robotframework-7.0/src/robot/running/userkeywordrunner.py +260 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/__init__.py +53 -35
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/dotdict.py +3 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/escaping.py +19 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/importer.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markupwriters.py +23 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/misc.py +1 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotio.py +9 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottime.py +122 -90
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottypes.py +21 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/scopes.py +17 -12
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/store.py +14 -16
- robotframework-7.0/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/SOURCES.txt +10 -8
- {robotframework-6.1rc1 → robotframework-7.0}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/htmldata/rebot/common.css +0 -239
- 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/output/xmllogger.py +0 -354
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/result/keywordremover.py +0 -183
- robotframework-6.1rc1/src/robot/result/model.py +0 -957
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/argumentresolver.py +0 -131
- robotframework-6.1rc1/src/robot/running/arguments/embedded.py +0 -146
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/builder/transformers.py +0 -642
- robotframework-6.1rc1/src/robot/running/handlers.py +0 -321
- robotframework-6.1rc1/src/robot/running/handlerstore.py +0 -66
- robotframework-6.1rc1/src/robot/running/librarykeywordrunner.py +0 -238
- robotframework-6.1rc1/src/robot/running/libraryscopes.py +0 -97
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/running/suiterunner.py +0 -249
- robotframework-6.1rc1/src/robot/running/testlibraries.py +0 -420
- robotframework-6.1rc1/src/robot/running/usererrorhandler.py +0 -75
- robotframework-6.1rc1/src/robot/running/userkeyword.py +0 -111
- robotframework-6.1rc1/src/robot/running/userkeywordrunner.py +0 -274
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -1,165 +0,0 @@
|
|
|
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
|
-
from robot.model import BodyItem
|
|
17
|
-
from robot.utils import is_list_like, is_dict_like, is_string, safe_str
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ListenerArguments:
|
|
21
|
-
|
|
22
|
-
def __init__(self, arguments):
|
|
23
|
-
self._arguments = arguments
|
|
24
|
-
self._version2 = None
|
|
25
|
-
self._version3 = None
|
|
26
|
-
|
|
27
|
-
def get_arguments(self, version):
|
|
28
|
-
if version == 2:
|
|
29
|
-
if self._version2 is None:
|
|
30
|
-
self._version2 = self._get_version2_arguments(*self._arguments)
|
|
31
|
-
return self._version2
|
|
32
|
-
else:
|
|
33
|
-
if self._version3 is None:
|
|
34
|
-
self._version3 = self._get_version3_arguments(*self._arguments)
|
|
35
|
-
return self._version3
|
|
36
|
-
|
|
37
|
-
def _get_version2_arguments(self, *arguments):
|
|
38
|
-
return arguments
|
|
39
|
-
|
|
40
|
-
def _get_version3_arguments(self, *arguments):
|
|
41
|
-
return arguments
|
|
42
|
-
|
|
43
|
-
@classmethod
|
|
44
|
-
def by_method_name(cls, name, arguments):
|
|
45
|
-
Arguments = {'start_suite': StartSuiteArguments,
|
|
46
|
-
'end_suite': EndSuiteArguments,
|
|
47
|
-
'start_test': StartTestArguments,
|
|
48
|
-
'end_test': EndTestArguments,
|
|
49
|
-
'start_keyword': StartKeywordArguments,
|
|
50
|
-
'end_keyword': EndKeywordArguments,
|
|
51
|
-
'log_message': MessageArguments,
|
|
52
|
-
'message': MessageArguments}.get(name, ListenerArguments)
|
|
53
|
-
return Arguments(arguments)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class MessageArguments(ListenerArguments):
|
|
57
|
-
|
|
58
|
-
def _get_version2_arguments(self, msg):
|
|
59
|
-
attributes = {'timestamp': msg.timestamp,
|
|
60
|
-
'message': msg.message,
|
|
61
|
-
'level': msg.level,
|
|
62
|
-
'html': 'yes' if msg.html else 'no'}
|
|
63
|
-
return attributes,
|
|
64
|
-
|
|
65
|
-
def _get_version3_arguments(self, msg):
|
|
66
|
-
return msg,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class _ListenerArgumentsFromItem(ListenerArguments):
|
|
70
|
-
_attribute_names = None
|
|
71
|
-
|
|
72
|
-
def _get_version2_arguments(self, item):
|
|
73
|
-
attributes = dict((name, self._get_attribute_value(item, name))
|
|
74
|
-
for name in self._attribute_names)
|
|
75
|
-
attributes.update(self._get_extra_attributes(item))
|
|
76
|
-
return item.name or '', attributes
|
|
77
|
-
|
|
78
|
-
def _get_attribute_value(self, item, name):
|
|
79
|
-
value = getattr(item, name)
|
|
80
|
-
if value is None:
|
|
81
|
-
return ''
|
|
82
|
-
return self._take_copy_of_mutable_value(value)
|
|
83
|
-
|
|
84
|
-
def _take_copy_of_mutable_value(self, value):
|
|
85
|
-
if is_dict_like(value):
|
|
86
|
-
return dict(value)
|
|
87
|
-
if is_list_like(value):
|
|
88
|
-
return list(value)
|
|
89
|
-
return value
|
|
90
|
-
|
|
91
|
-
def _get_extra_attributes(self, item):
|
|
92
|
-
return {}
|
|
93
|
-
|
|
94
|
-
def _get_version3_arguments(self, item):
|
|
95
|
-
return item.data, item.result
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
class StartSuiteArguments(_ListenerArgumentsFromItem):
|
|
99
|
-
_attribute_names = ('id', 'longname', 'doc', 'metadata', 'starttime')
|
|
100
|
-
|
|
101
|
-
def _get_extra_attributes(self, suite):
|
|
102
|
-
return {'tests': [t.name for t in suite.tests],
|
|
103
|
-
'suites': [s.name for s in suite.suites],
|
|
104
|
-
'totaltests': suite.test_count,
|
|
105
|
-
'source': str(suite.source or '')}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class EndSuiteArguments(StartSuiteArguments):
|
|
109
|
-
_attribute_names = ('id', 'longname', 'doc', 'metadata', 'starttime',
|
|
110
|
-
'endtime', 'elapsedtime', 'status', 'message')
|
|
111
|
-
|
|
112
|
-
def _get_extra_attributes(self, suite):
|
|
113
|
-
attrs = super()._get_extra_attributes(suite)
|
|
114
|
-
attrs['statistics'] = suite.stat_message
|
|
115
|
-
return attrs
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
class StartTestArguments(_ListenerArgumentsFromItem):
|
|
119
|
-
_attribute_names = ('id', 'longname', 'doc', 'tags', 'lineno', 'starttime')
|
|
120
|
-
|
|
121
|
-
def _get_extra_attributes(self, test):
|
|
122
|
-
return {'source': str(test.source or ''),
|
|
123
|
-
'template': test.template or '',
|
|
124
|
-
'originalname': test.data.name}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class EndTestArguments(StartTestArguments):
|
|
128
|
-
_attribute_names = ('id', 'longname', 'doc', 'tags', 'lineno', 'starttime',
|
|
129
|
-
'endtime', 'elapsedtime', 'status', 'message')
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
class StartKeywordArguments(_ListenerArgumentsFromItem):
|
|
133
|
-
_attribute_names = ('doc', 'assign', 'tags', 'lineno', 'type', 'status', 'starttime')
|
|
134
|
-
_type_attributes = {
|
|
135
|
-
BodyItem.FOR: ('variables', 'flavor', 'values'),
|
|
136
|
-
BodyItem.IF: ('condition',),
|
|
137
|
-
BodyItem.ELSE_IF: ('condition',),
|
|
138
|
-
BodyItem.EXCEPT: ('patterns', 'pattern_type', 'variable'),
|
|
139
|
-
BodyItem.WHILE: ('condition', 'limit', 'on_limit_message'),
|
|
140
|
-
BodyItem.RETURN: ('values',),
|
|
141
|
-
BodyItem.ITERATION: ('variables',)
|
|
142
|
-
}
|
|
143
|
-
_for_flavor_attributes = {
|
|
144
|
-
'IN ENUMERATE': ('start',),
|
|
145
|
-
'IN ZIP': ('mode', 'fill')
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
def _get_extra_attributes(self, kw):
|
|
149
|
-
attrs = {'kwname': kw.kwname or '',
|
|
150
|
-
'libname': kw.libname or '',
|
|
151
|
-
'args': [a if is_string(a) else safe_str(a) for a in kw.args],
|
|
152
|
-
'source': str(kw.source or '')}
|
|
153
|
-
if kw.type in self._type_attributes:
|
|
154
|
-
for name in self._type_attributes[kw.type]:
|
|
155
|
-
if hasattr(kw, name):
|
|
156
|
-
attrs[name] = self._get_attribute_value(kw, name)
|
|
157
|
-
if kw.type == BodyItem.FOR:
|
|
158
|
-
for name in self._for_flavor_attributes.get(kw.flavor, ()):
|
|
159
|
-
attrs[name] = self._get_attribute_value(kw, name)
|
|
160
|
-
return attrs
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
class EndKeywordArguments(StartKeywordArguments):
|
|
164
|
-
_attribute_names = ('doc', 'assign', 'tags', 'lineno', 'type', 'status',
|
|
165
|
-
'starttime', 'endtime', 'elapsedtime')
|
|
@@ -1,113 +0,0 @@
|
|
|
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
|
-
from robot.errors import TimeoutError
|
|
17
|
-
from robot.utils import get_error_details
|
|
18
|
-
|
|
19
|
-
from .listenerarguments import ListenerArguments
|
|
20
|
-
from .logger import LOGGER
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class ListenerMethods:
|
|
24
|
-
|
|
25
|
-
def __init__(self, method_name, listeners):
|
|
26
|
-
self._methods = []
|
|
27
|
-
self._method_name = method_name
|
|
28
|
-
if listeners:
|
|
29
|
-
self._register_methods(method_name, listeners)
|
|
30
|
-
|
|
31
|
-
def _register_methods(self, method_name, listeners):
|
|
32
|
-
for listener in listeners:
|
|
33
|
-
method = getattr(listener, method_name)
|
|
34
|
-
if method:
|
|
35
|
-
self._methods.append(ListenerMethod(method, listener))
|
|
36
|
-
|
|
37
|
-
def __call__(self, *args):
|
|
38
|
-
if self._methods:
|
|
39
|
-
args = ListenerArguments.by_method_name(self._method_name, args)
|
|
40
|
-
for method in self._methods:
|
|
41
|
-
method(args.get_arguments(method.version))
|
|
42
|
-
|
|
43
|
-
def __bool__(self):
|
|
44
|
-
return bool(self._methods)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class LibraryListenerMethods:
|
|
48
|
-
|
|
49
|
-
def __init__(self, method_name):
|
|
50
|
-
self._method_stack = []
|
|
51
|
-
self._method_name = method_name
|
|
52
|
-
|
|
53
|
-
def new_suite_scope(self):
|
|
54
|
-
self._method_stack.append([])
|
|
55
|
-
|
|
56
|
-
def discard_suite_scope(self):
|
|
57
|
-
self._method_stack.pop()
|
|
58
|
-
|
|
59
|
-
def register(self, listeners, library):
|
|
60
|
-
methods = self._method_stack[-1]
|
|
61
|
-
for listener in listeners:
|
|
62
|
-
method = getattr(listener, self._method_name)
|
|
63
|
-
if method:
|
|
64
|
-
info = ListenerMethod(method, listener, library)
|
|
65
|
-
methods.append(info)
|
|
66
|
-
|
|
67
|
-
def unregister(self, library):
|
|
68
|
-
methods = [m for m in self._method_stack[-1] if m.library is not library]
|
|
69
|
-
self._method_stack[-1] = methods
|
|
70
|
-
|
|
71
|
-
def __call__(self, *args, **conf):
|
|
72
|
-
methods = self._get_methods(**conf)
|
|
73
|
-
if methods:
|
|
74
|
-
args = ListenerArguments.by_method_name(self._method_name, args)
|
|
75
|
-
for method in methods:
|
|
76
|
-
method(args.get_arguments(method.version))
|
|
77
|
-
|
|
78
|
-
def _get_methods(self, library=None):
|
|
79
|
-
if not (self._method_stack and self._method_stack[-1]):
|
|
80
|
-
return []
|
|
81
|
-
methods = self._method_stack[-1]
|
|
82
|
-
if library:
|
|
83
|
-
return [m for m in methods if m.library is library]
|
|
84
|
-
return methods
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class ListenerMethod:
|
|
88
|
-
# Flag to avoid recursive listener calls.
|
|
89
|
-
called = False
|
|
90
|
-
|
|
91
|
-
def __init__(self, method, listener, library=None):
|
|
92
|
-
self.method = method
|
|
93
|
-
self.listener_name = listener.name
|
|
94
|
-
self.version = listener.version
|
|
95
|
-
self.library = library
|
|
96
|
-
|
|
97
|
-
def __call__(self, args):
|
|
98
|
-
if self.called:
|
|
99
|
-
return
|
|
100
|
-
try:
|
|
101
|
-
ListenerMethod.called = True
|
|
102
|
-
self.method(*args)
|
|
103
|
-
except TimeoutError:
|
|
104
|
-
# Propagate possible timeouts:
|
|
105
|
-
# https://github.com/robotframework/robotframework/issues/2763
|
|
106
|
-
raise
|
|
107
|
-
except:
|
|
108
|
-
message, details = get_error_details()
|
|
109
|
-
LOGGER.error("Calling method '%s' of listener '%s' failed: %s"
|
|
110
|
-
% (self.method.__name__, self.listener_name, message))
|
|
111
|
-
LOGGER.info("Details:\n%s" % details)
|
|
112
|
-
finally:
|
|
113
|
-
ListenerMethod.called = False
|
|
@@ -1,174 +0,0 @@
|
|
|
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
|
|
19
|
-
from robot.utils import Importer, is_string, split_args_from_name_or_path, type_name
|
|
20
|
-
|
|
21
|
-
from .listenermethods import ListenerMethods, LibraryListenerMethods
|
|
22
|
-
from .loggerhelper import AbstractLoggerProxy, IsLogged
|
|
23
|
-
from .logger import LOGGER
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class Listeners:
|
|
27
|
-
_method_names = ('start_suite', 'end_suite', 'start_test', 'end_test',
|
|
28
|
-
'start_keyword', 'end_keyword', 'log_message', 'message',
|
|
29
|
-
'output_file', 'report_file', 'log_file', 'debug_file',
|
|
30
|
-
'xunit_file', 'library_import', 'resource_import',
|
|
31
|
-
'variables_import', 'close')
|
|
32
|
-
|
|
33
|
-
def __init__(self, listeners, log_level='INFO'):
|
|
34
|
-
self._is_logged = IsLogged(log_level)
|
|
35
|
-
listeners = ListenerProxy.import_listeners(listeners,
|
|
36
|
-
self._method_names)
|
|
37
|
-
for name in self._method_names:
|
|
38
|
-
method = ListenerMethods(name, listeners)
|
|
39
|
-
if name.endswith(('_keyword', '_file', '_import', 'log_message')):
|
|
40
|
-
name = '_' + name
|
|
41
|
-
setattr(self, name, method)
|
|
42
|
-
|
|
43
|
-
def set_log_level(self, level):
|
|
44
|
-
self._is_logged.set_level(level)
|
|
45
|
-
|
|
46
|
-
def start_keyword(self, kw):
|
|
47
|
-
if kw.type not in (kw.IF_ELSE_ROOT, kw.TRY_EXCEPT_ROOT):
|
|
48
|
-
self._start_keyword(kw)
|
|
49
|
-
|
|
50
|
-
def end_keyword(self, kw):
|
|
51
|
-
if kw.type not in (kw.IF_ELSE_ROOT, kw.TRY_EXCEPT_ROOT):
|
|
52
|
-
self._end_keyword(kw)
|
|
53
|
-
|
|
54
|
-
def log_message(self, msg):
|
|
55
|
-
if self._is_logged(msg.level):
|
|
56
|
-
self._log_message(msg)
|
|
57
|
-
|
|
58
|
-
def imported(self, import_type, name, attrs):
|
|
59
|
-
method = getattr(self, '_%s_import' % import_type.lower())
|
|
60
|
-
method(name, attrs)
|
|
61
|
-
|
|
62
|
-
def output_file(self, file_type, path):
|
|
63
|
-
method = getattr(self, '_%s_file' % file_type.lower())
|
|
64
|
-
method(path)
|
|
65
|
-
|
|
66
|
-
def __bool__(self):
|
|
67
|
-
return any(isinstance(method, ListenerMethods) and method
|
|
68
|
-
for method in self.__dict__.values())
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class LibraryListeners:
|
|
72
|
-
_method_names = ('start_suite', 'end_suite', 'start_test', 'end_test',
|
|
73
|
-
'start_keyword', 'end_keyword', 'log_message', 'message',
|
|
74
|
-
'close')
|
|
75
|
-
|
|
76
|
-
def __init__(self, log_level='INFO'):
|
|
77
|
-
self._is_logged = IsLogged(log_level)
|
|
78
|
-
for name in self._method_names:
|
|
79
|
-
method = LibraryListenerMethods(name)
|
|
80
|
-
if name == 'log_message':
|
|
81
|
-
name = '_' + name
|
|
82
|
-
setattr(self, name, method)
|
|
83
|
-
|
|
84
|
-
def register(self, listeners, library):
|
|
85
|
-
listeners = ListenerProxy.import_listeners(listeners,
|
|
86
|
-
self._method_names,
|
|
87
|
-
prefix='_',
|
|
88
|
-
raise_on_error=True)
|
|
89
|
-
for method in self._listener_methods():
|
|
90
|
-
method.register(listeners, library)
|
|
91
|
-
|
|
92
|
-
def _listener_methods(self):
|
|
93
|
-
return [method for method in self.__dict__.values()
|
|
94
|
-
if isinstance(method, LibraryListenerMethods)]
|
|
95
|
-
|
|
96
|
-
def unregister(self, library, close=False):
|
|
97
|
-
if close:
|
|
98
|
-
self.close(library=library)
|
|
99
|
-
for method in self._listener_methods():
|
|
100
|
-
method.unregister(library)
|
|
101
|
-
|
|
102
|
-
def new_suite_scope(self):
|
|
103
|
-
for method in self._listener_methods():
|
|
104
|
-
method.new_suite_scope()
|
|
105
|
-
|
|
106
|
-
def discard_suite_scope(self):
|
|
107
|
-
for method in self._listener_methods():
|
|
108
|
-
method.discard_suite_scope()
|
|
109
|
-
|
|
110
|
-
def set_log_level(self, level):
|
|
111
|
-
self._is_logged.set_level(level)
|
|
112
|
-
|
|
113
|
-
def log_message(self, msg):
|
|
114
|
-
if self._is_logged(msg.level):
|
|
115
|
-
self._log_message(msg)
|
|
116
|
-
|
|
117
|
-
def imported(self, import_type, name, attrs):
|
|
118
|
-
pass
|
|
119
|
-
|
|
120
|
-
def output_file(self, file_type, path):
|
|
121
|
-
pass
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class ListenerProxy(AbstractLoggerProxy):
|
|
125
|
-
_no_method = None
|
|
126
|
-
|
|
127
|
-
def __init__(self, listener, method_names, prefix=None):
|
|
128
|
-
listener, name = self._import_listener(listener)
|
|
129
|
-
AbstractLoggerProxy.__init__(self, listener, method_names, prefix)
|
|
130
|
-
self.name = name
|
|
131
|
-
self.version = self._get_version(listener)
|
|
132
|
-
if self.version == 3:
|
|
133
|
-
self.start_keyword = self.end_keyword = None
|
|
134
|
-
self.library_import = self.resource_import = self.variables_import = None
|
|
135
|
-
|
|
136
|
-
def _import_listener(self, listener):
|
|
137
|
-
if not is_string(listener):
|
|
138
|
-
# Modules have `__name__`, with others better to use `type_name`.
|
|
139
|
-
name = getattr(listener, '__name__', None) or type_name(listener)
|
|
140
|
-
return listener, name
|
|
141
|
-
name, args = split_args_from_name_or_path(listener)
|
|
142
|
-
importer = Importer('listener', logger=LOGGER)
|
|
143
|
-
listener = importer.import_class_or_module(os.path.normpath(name),
|
|
144
|
-
instantiate_with_args=args)
|
|
145
|
-
return listener, name
|
|
146
|
-
|
|
147
|
-
def _get_version(self, listener):
|
|
148
|
-
try:
|
|
149
|
-
version = int(listener.ROBOT_LISTENER_API_VERSION)
|
|
150
|
-
if version not in (2, 3):
|
|
151
|
-
raise ValueError
|
|
152
|
-
except AttributeError:
|
|
153
|
-
raise DataError("Listener '%s' does not have mandatory "
|
|
154
|
-
"'ROBOT_LISTENER_API_VERSION' attribute."
|
|
155
|
-
% self.name)
|
|
156
|
-
except (ValueError, TypeError):
|
|
157
|
-
raise DataError("Listener '%s' uses unsupported API version '%s'."
|
|
158
|
-
% (self.name, listener.ROBOT_LISTENER_API_VERSION))
|
|
159
|
-
return version
|
|
160
|
-
|
|
161
|
-
@classmethod
|
|
162
|
-
def import_listeners(cls, listeners, method_names, prefix=None,
|
|
163
|
-
raise_on_error=False):
|
|
164
|
-
imported = []
|
|
165
|
-
for listener in listeners:
|
|
166
|
-
try:
|
|
167
|
-
imported.append(cls(listener, method_names, prefix))
|
|
168
|
-
except DataError as err:
|
|
169
|
-
name = listener if is_string(listener) else type_name(listener)
|
|
170
|
-
msg = "Taking listener '%s' into use failed: %s" % (name, err)
|
|
171
|
-
if raise_on_error:
|
|
172
|
-
raise DataError(msg)
|
|
173
|
-
LOGGER.error(msg)
|
|
174
|
-
return imported
|
|
@@ -1,95 +0,0 @@
|
|
|
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
|
-
from . import pyloggingconf
|
|
17
|
-
from .debugfile import DebugFile
|
|
18
|
-
from .listeners import LibraryListeners, Listeners
|
|
19
|
-
from .logger import LOGGER, LoggerProxy
|
|
20
|
-
from .loggerhelper import AbstractLogger
|
|
21
|
-
from .xmllogger import XmlLogger, FlatXmlLogger
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Output(AbstractLogger):
|
|
25
|
-
|
|
26
|
-
def __init__(self, settings):
|
|
27
|
-
AbstractLogger.__init__(self)
|
|
28
|
-
self._xmllogger = XmlLogger(settings.output, settings.log_level,
|
|
29
|
-
settings.rpa)
|
|
30
|
-
self._flat_xml_logger = None
|
|
31
|
-
self.listeners = Listeners(settings.listeners, settings.log_level)
|
|
32
|
-
self.library_listeners = LibraryListeners(settings.log_level)
|
|
33
|
-
self._register_loggers(DebugFile(settings.debug_file))
|
|
34
|
-
self._settings = settings
|
|
35
|
-
self._flatten_level = 0
|
|
36
|
-
|
|
37
|
-
@property
|
|
38
|
-
def flat_xml_logger(self):
|
|
39
|
-
if self._flat_xml_logger is None:
|
|
40
|
-
self._flat_xml_logger = FlatXmlLogger(self._xmllogger)
|
|
41
|
-
return self._flat_xml_logger
|
|
42
|
-
|
|
43
|
-
def _register_loggers(self, debug_file):
|
|
44
|
-
LOGGER.register_xml_logger(self._xmllogger)
|
|
45
|
-
LOGGER.register_listeners(self.listeners or None, self.library_listeners)
|
|
46
|
-
if debug_file:
|
|
47
|
-
LOGGER.register_logger(debug_file)
|
|
48
|
-
|
|
49
|
-
def register_error_listener(self, listener):
|
|
50
|
-
LOGGER.register_error_listener(listener)
|
|
51
|
-
|
|
52
|
-
def close(self, result):
|
|
53
|
-
self._xmllogger.visit_statistics(result.statistics)
|
|
54
|
-
self._xmllogger.close()
|
|
55
|
-
LOGGER.unregister_xml_logger()
|
|
56
|
-
LOGGER.output_file('Output', self._settings['Output'])
|
|
57
|
-
|
|
58
|
-
def start_suite(self, suite):
|
|
59
|
-
LOGGER.start_suite(suite)
|
|
60
|
-
|
|
61
|
-
def end_suite(self, suite):
|
|
62
|
-
LOGGER.end_suite(suite)
|
|
63
|
-
|
|
64
|
-
def start_test(self, test):
|
|
65
|
-
LOGGER.start_test(test)
|
|
66
|
-
|
|
67
|
-
def end_test(self, test):
|
|
68
|
-
LOGGER.end_test(test)
|
|
69
|
-
|
|
70
|
-
def start_keyword(self, kw):
|
|
71
|
-
LOGGER.start_keyword(kw)
|
|
72
|
-
if kw.tags.robot('flatten'):
|
|
73
|
-
self._flatten_level += 1
|
|
74
|
-
if self._flatten_level == 1:
|
|
75
|
-
LOGGER._xml_logger = LoggerProxy(self.flat_xml_logger)
|
|
76
|
-
|
|
77
|
-
def end_keyword(self, kw):
|
|
78
|
-
if kw.tags.robot('flatten'):
|
|
79
|
-
self._flatten_level -= 1
|
|
80
|
-
if not self._flatten_level:
|
|
81
|
-
LOGGER._xml_logger = LoggerProxy(self._xmllogger)
|
|
82
|
-
LOGGER.end_keyword(kw)
|
|
83
|
-
|
|
84
|
-
def message(self, msg):
|
|
85
|
-
LOGGER.log_message(msg)
|
|
86
|
-
|
|
87
|
-
def trace(self, msg, write_if_flat=True):
|
|
88
|
-
if write_if_flat or self._flatten_level == 0:
|
|
89
|
-
self.write(msg, 'TRACE')
|
|
90
|
-
|
|
91
|
-
def set_log_level(self, level):
|
|
92
|
-
pyloggingconf.set_level(level)
|
|
93
|
-
self.listeners.set_log_level(level)
|
|
94
|
-
self.library_listeners.set_log_level(level)
|
|
95
|
-
return self._xmllogger.set_log_level(level)
|