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,354 +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.utils import get_timestamp, NullMarkupWriter, safe_str, XmlWriter
|
|
17
|
-
from robot.version import get_full_version
|
|
18
|
-
from robot.result.visitor import ResultVisitor
|
|
19
|
-
|
|
20
|
-
from .loggerhelper import IsLogged
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class XmlLogger(ResultVisitor):
|
|
24
|
-
|
|
25
|
-
def __init__(self, path, log_level='TRACE', rpa=False, generator='Robot'):
|
|
26
|
-
self._log_message_is_logged = IsLogged(log_level)
|
|
27
|
-
self._error_message_is_logged = IsLogged('WARN')
|
|
28
|
-
self._writer = self._get_writer(path, rpa, generator)
|
|
29
|
-
self._errors = []
|
|
30
|
-
|
|
31
|
-
def _get_writer(self, path, rpa, generator):
|
|
32
|
-
if not path:
|
|
33
|
-
return NullMarkupWriter()
|
|
34
|
-
writer = XmlWriter(path, write_empty=False, usage='output')
|
|
35
|
-
writer.start('robot', {'generator': get_full_version(generator),
|
|
36
|
-
'generated': get_timestamp(),
|
|
37
|
-
'rpa': 'true' if rpa else 'false',
|
|
38
|
-
'schemaversion': '4'})
|
|
39
|
-
return writer
|
|
40
|
-
|
|
41
|
-
def close(self):
|
|
42
|
-
self.start_errors()
|
|
43
|
-
for msg in self._errors:
|
|
44
|
-
self._write_message(msg)
|
|
45
|
-
self.end_errors()
|
|
46
|
-
self._writer.end('robot')
|
|
47
|
-
self._writer.close()
|
|
48
|
-
|
|
49
|
-
def set_log_level(self, level):
|
|
50
|
-
return self._log_message_is_logged.set_level(level)
|
|
51
|
-
|
|
52
|
-
def message(self, msg):
|
|
53
|
-
if self._error_message_is_logged(msg.level):
|
|
54
|
-
self._errors.append(msg)
|
|
55
|
-
|
|
56
|
-
def log_message(self, msg):
|
|
57
|
-
if self._log_message_is_logged(msg.level):
|
|
58
|
-
self._write_message(msg)
|
|
59
|
-
|
|
60
|
-
def _write_message(self, msg):
|
|
61
|
-
attrs = {'timestamp': msg.timestamp or 'N/A', 'level': msg.level}
|
|
62
|
-
if msg.html:
|
|
63
|
-
attrs['html'] = 'true'
|
|
64
|
-
self._writer.element('msg', msg.message, attrs)
|
|
65
|
-
|
|
66
|
-
def start_keyword(self, kw):
|
|
67
|
-
attrs = {'name': kw.kwname, 'library': kw.libname}
|
|
68
|
-
if kw.type != 'KEYWORD':
|
|
69
|
-
attrs['type'] = kw.type
|
|
70
|
-
if kw.sourcename:
|
|
71
|
-
attrs['sourcename'] = kw.sourcename
|
|
72
|
-
self._writer.start('kw', attrs)
|
|
73
|
-
self._write_list('var', kw.assign)
|
|
74
|
-
self._write_list('arg', [safe_str(a) for a in kw.args])
|
|
75
|
-
self._write_list('tag', kw.tags)
|
|
76
|
-
# Must be after tags to allow adding message when using --flattenkeywords.
|
|
77
|
-
self._writer.element('doc', kw.doc)
|
|
78
|
-
|
|
79
|
-
def end_keyword(self, kw):
|
|
80
|
-
if kw.timeout:
|
|
81
|
-
self._writer.element('timeout', attrs={'value': str(kw.timeout)})
|
|
82
|
-
self._write_status(kw)
|
|
83
|
-
self._writer.end('kw')
|
|
84
|
-
|
|
85
|
-
def start_if(self, if_):
|
|
86
|
-
self._writer.start('if')
|
|
87
|
-
self._writer.element('doc', if_.doc)
|
|
88
|
-
|
|
89
|
-
def end_if(self, if_):
|
|
90
|
-
self._write_status(if_)
|
|
91
|
-
self._writer.end('if')
|
|
92
|
-
|
|
93
|
-
def start_if_branch(self, branch):
|
|
94
|
-
self._writer.start('branch', {'type': branch.type,
|
|
95
|
-
'condition': branch.condition})
|
|
96
|
-
self._writer.element('doc', branch.doc)
|
|
97
|
-
|
|
98
|
-
def end_if_branch(self, branch):
|
|
99
|
-
self._write_status(branch)
|
|
100
|
-
self._writer.end('branch')
|
|
101
|
-
|
|
102
|
-
def start_for(self, for_):
|
|
103
|
-
self._writer.start('for', {'flavor': for_.flavor,
|
|
104
|
-
'start': for_.start,
|
|
105
|
-
'mode': for_.mode,
|
|
106
|
-
'fill': for_.fill})
|
|
107
|
-
for name in for_.variables:
|
|
108
|
-
self._writer.element('var', name)
|
|
109
|
-
for value in for_.values:
|
|
110
|
-
self._writer.element('value', value)
|
|
111
|
-
self._writer.element('doc', for_.doc)
|
|
112
|
-
|
|
113
|
-
def end_for(self, for_):
|
|
114
|
-
self._write_status(for_)
|
|
115
|
-
self._writer.end('for')
|
|
116
|
-
|
|
117
|
-
def start_for_iteration(self, iteration):
|
|
118
|
-
self._writer.start('iter')
|
|
119
|
-
for name, value in iteration.variables.items():
|
|
120
|
-
self._writer.element('var', value, {'name': name})
|
|
121
|
-
self._writer.element('doc', iteration.doc)
|
|
122
|
-
|
|
123
|
-
def end_for_iteration(self, iteration):
|
|
124
|
-
self._write_status(iteration)
|
|
125
|
-
self._writer.end('iter')
|
|
126
|
-
|
|
127
|
-
def start_try(self, root):
|
|
128
|
-
self._writer.start('try')
|
|
129
|
-
|
|
130
|
-
def end_try(self, root):
|
|
131
|
-
self._write_status(root)
|
|
132
|
-
self._writer.end('try')
|
|
133
|
-
|
|
134
|
-
def start_try_branch(self, branch):
|
|
135
|
-
if branch.type == branch.EXCEPT:
|
|
136
|
-
self._writer.start('branch', attrs={
|
|
137
|
-
'type': 'EXCEPT', 'variable': branch.variable,
|
|
138
|
-
'pattern_type': branch.pattern_type
|
|
139
|
-
})
|
|
140
|
-
self._write_list('pattern', branch.patterns)
|
|
141
|
-
else:
|
|
142
|
-
self._writer.start('branch', attrs={'type': branch.type})
|
|
143
|
-
|
|
144
|
-
def end_try_branch(self, branch):
|
|
145
|
-
self._write_status(branch)
|
|
146
|
-
self._writer.end('branch')
|
|
147
|
-
|
|
148
|
-
def start_while(self, while_):
|
|
149
|
-
self._writer.start('while', attrs={
|
|
150
|
-
'condition': while_.condition,
|
|
151
|
-
'limit': while_.limit,
|
|
152
|
-
'on_limit': while_.on_limit,
|
|
153
|
-
'on_limit_message': while_.on_limit_message
|
|
154
|
-
})
|
|
155
|
-
self._writer.element('doc', while_.doc)
|
|
156
|
-
|
|
157
|
-
def end_while(self, while_):
|
|
158
|
-
self._write_status(while_)
|
|
159
|
-
self._writer.end('while')
|
|
160
|
-
|
|
161
|
-
def start_while_iteration(self, iteration):
|
|
162
|
-
self._writer.start('iter')
|
|
163
|
-
self._writer.element('doc', iteration.doc)
|
|
164
|
-
|
|
165
|
-
def end_while_iteration(self, iteration):
|
|
166
|
-
self._write_status(iteration)
|
|
167
|
-
self._writer.end('iter')
|
|
168
|
-
|
|
169
|
-
def start_return(self, return_):
|
|
170
|
-
self._writer.start('return')
|
|
171
|
-
for value in return_.values:
|
|
172
|
-
self._writer.element('value', value)
|
|
173
|
-
|
|
174
|
-
def end_return(self, return_):
|
|
175
|
-
self._write_status(return_)
|
|
176
|
-
self._writer.end('return')
|
|
177
|
-
|
|
178
|
-
def start_continue(self, continue_):
|
|
179
|
-
self._writer.start('continue')
|
|
180
|
-
|
|
181
|
-
def end_continue(self, continue_):
|
|
182
|
-
self._write_status(continue_)
|
|
183
|
-
self._writer.end('continue')
|
|
184
|
-
|
|
185
|
-
def start_break(self, break_):
|
|
186
|
-
self._writer.start('break')
|
|
187
|
-
|
|
188
|
-
def end_break(self, break_):
|
|
189
|
-
self._write_status(break_)
|
|
190
|
-
self._writer.end('break')
|
|
191
|
-
|
|
192
|
-
def start_error(self, error):
|
|
193
|
-
self._writer.start('error')
|
|
194
|
-
for value in error.values:
|
|
195
|
-
self._writer.element('value', value)
|
|
196
|
-
|
|
197
|
-
def end_error(self, error):
|
|
198
|
-
self._write_status(error)
|
|
199
|
-
self._writer.end('error')
|
|
200
|
-
|
|
201
|
-
def start_test(self, test):
|
|
202
|
-
self._writer.start('test', {'id': test.id, 'name': test.name,
|
|
203
|
-
'line': str(test.lineno or '')})
|
|
204
|
-
|
|
205
|
-
def end_test(self, test):
|
|
206
|
-
self._writer.element('doc', test.doc)
|
|
207
|
-
self._write_list('tag', test.tags)
|
|
208
|
-
if test.timeout:
|
|
209
|
-
self._writer.element('timeout', attrs={'value': str(test.timeout)})
|
|
210
|
-
self._write_status(test)
|
|
211
|
-
self._writer.end('test')
|
|
212
|
-
|
|
213
|
-
def start_suite(self, suite):
|
|
214
|
-
attrs = {'id': suite.id, 'name': suite.name}
|
|
215
|
-
if suite.source:
|
|
216
|
-
attrs['source'] = str(suite.source)
|
|
217
|
-
self._writer.start('suite', attrs)
|
|
218
|
-
|
|
219
|
-
def end_suite(self, suite):
|
|
220
|
-
self._writer.element('doc', suite.doc)
|
|
221
|
-
for name, value in suite.metadata.items():
|
|
222
|
-
self._writer.element('meta', value, {'name': name})
|
|
223
|
-
self._write_status(suite)
|
|
224
|
-
self._writer.end('suite')
|
|
225
|
-
|
|
226
|
-
def start_statistics(self, stats):
|
|
227
|
-
self._writer.start('statistics')
|
|
228
|
-
|
|
229
|
-
def end_statistics(self, stats):
|
|
230
|
-
self._writer.end('statistics')
|
|
231
|
-
|
|
232
|
-
def start_total_statistics(self, total_stats):
|
|
233
|
-
self._writer.start('total')
|
|
234
|
-
|
|
235
|
-
def end_total_statistics(self, total_stats):
|
|
236
|
-
self._writer.end('total')
|
|
237
|
-
|
|
238
|
-
def start_tag_statistics(self, tag_stats):
|
|
239
|
-
self._writer.start('tag')
|
|
240
|
-
|
|
241
|
-
def end_tag_statistics(self, tag_stats):
|
|
242
|
-
self._writer.end('tag')
|
|
243
|
-
|
|
244
|
-
def start_suite_statistics(self, tag_stats):
|
|
245
|
-
self._writer.start('suite')
|
|
246
|
-
|
|
247
|
-
def end_suite_statistics(self, tag_stats):
|
|
248
|
-
self._writer.end('suite')
|
|
249
|
-
|
|
250
|
-
def visit_stat(self, stat):
|
|
251
|
-
self._writer.element('stat', stat.name,
|
|
252
|
-
stat.get_attributes(values_as_strings=True))
|
|
253
|
-
|
|
254
|
-
def start_errors(self, errors=None):
|
|
255
|
-
self._writer.start('errors')
|
|
256
|
-
|
|
257
|
-
def end_errors(self, errors=None):
|
|
258
|
-
self._writer.end('errors')
|
|
259
|
-
|
|
260
|
-
def _write_list(self, tag, items):
|
|
261
|
-
for item in items:
|
|
262
|
-
self._writer.element(tag, item)
|
|
263
|
-
|
|
264
|
-
def _write_status(self, item):
|
|
265
|
-
attrs = {'status': item.status, 'starttime': item.starttime or 'N/A',
|
|
266
|
-
'endtime': item.endtime or 'N/A'}
|
|
267
|
-
if not (item.starttime and item.endtime):
|
|
268
|
-
attrs['elapsedtime'] = str(item.elapsedtime)
|
|
269
|
-
self._writer.element('status', item.message, attrs)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
class FlatXmlLogger(XmlLogger):
|
|
273
|
-
|
|
274
|
-
def __init__(self, real_xml_logger):
|
|
275
|
-
super().__init__(None)
|
|
276
|
-
self._writer = real_xml_logger._writer
|
|
277
|
-
|
|
278
|
-
def start_keyword(self, kw):
|
|
279
|
-
pass
|
|
280
|
-
|
|
281
|
-
def end_keyword(self, kw):
|
|
282
|
-
pass
|
|
283
|
-
|
|
284
|
-
def start_for(self, for_):
|
|
285
|
-
pass
|
|
286
|
-
|
|
287
|
-
def end_for(self, for_):
|
|
288
|
-
pass
|
|
289
|
-
|
|
290
|
-
def start_for_iteration(self, iteration):
|
|
291
|
-
pass
|
|
292
|
-
|
|
293
|
-
def end_for_iteration(self, iteration):
|
|
294
|
-
pass
|
|
295
|
-
|
|
296
|
-
def start_if(self, if_):
|
|
297
|
-
pass
|
|
298
|
-
|
|
299
|
-
def end_if(self, if_):
|
|
300
|
-
pass
|
|
301
|
-
|
|
302
|
-
def start_if_branch(self, branch):
|
|
303
|
-
pass
|
|
304
|
-
|
|
305
|
-
def end_if_branch(self, branch):
|
|
306
|
-
pass
|
|
307
|
-
|
|
308
|
-
def start_try(self, root):
|
|
309
|
-
pass
|
|
310
|
-
|
|
311
|
-
def end_try(self, root):
|
|
312
|
-
pass
|
|
313
|
-
|
|
314
|
-
def start_try_branch(self, branch):
|
|
315
|
-
pass
|
|
316
|
-
|
|
317
|
-
def end_try_branch(self, branch):
|
|
318
|
-
pass
|
|
319
|
-
|
|
320
|
-
def start_while(self, while_):
|
|
321
|
-
pass
|
|
322
|
-
|
|
323
|
-
def end_while(self, while_):
|
|
324
|
-
pass
|
|
325
|
-
|
|
326
|
-
def start_while_iteration(self, iteration):
|
|
327
|
-
pass
|
|
328
|
-
|
|
329
|
-
def end_while_iteration(self, iteration):
|
|
330
|
-
pass
|
|
331
|
-
|
|
332
|
-
def start_break(self, break_):
|
|
333
|
-
pass
|
|
334
|
-
|
|
335
|
-
def end_break(self, break_):
|
|
336
|
-
pass
|
|
337
|
-
|
|
338
|
-
def start_continue(self, continue_):
|
|
339
|
-
pass
|
|
340
|
-
|
|
341
|
-
def end_continue(self, continue_):
|
|
342
|
-
pass
|
|
343
|
-
|
|
344
|
-
def start_return(self, return_):
|
|
345
|
-
pass
|
|
346
|
-
|
|
347
|
-
def end_return(self, return_):
|
|
348
|
-
pass
|
|
349
|
-
|
|
350
|
-
def start_error(self, error):
|
|
351
|
-
pass
|
|
352
|
-
|
|
353
|
-
def end_error(self, error):
|
|
354
|
-
pass
|
|
@@ -1,67 +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 ast
|
|
17
|
-
|
|
18
|
-
from .statements import Node
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class VisitorFinder:
|
|
22
|
-
|
|
23
|
-
def _find_visitor(self, cls):
|
|
24
|
-
if cls is ast.AST:
|
|
25
|
-
return None
|
|
26
|
-
method = 'visit_' + cls.__name__
|
|
27
|
-
if hasattr(self, method):
|
|
28
|
-
return getattr(self, method)
|
|
29
|
-
# Forward-compatibility.
|
|
30
|
-
if method == 'visit_Return' and hasattr(self, 'visit_ReturnSetting'):
|
|
31
|
-
return getattr(self, 'visit_ReturnSetting')
|
|
32
|
-
for base in cls.__bases__:
|
|
33
|
-
visitor = self._find_visitor(base)
|
|
34
|
-
if visitor:
|
|
35
|
-
return visitor
|
|
36
|
-
return None
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class ModelVisitor(ast.NodeVisitor, VisitorFinder):
|
|
40
|
-
"""NodeVisitor that supports matching nodes based on their base classes.
|
|
41
|
-
|
|
42
|
-
In other ways identical to the standard `ast.NodeVisitor
|
|
43
|
-
<https://docs.python.org/library/ast.html#ast.NodeVisitor>`__,
|
|
44
|
-
but allows creating ``visit_ClassName`` methods so that the ``ClassName``
|
|
45
|
-
is one of the base classes of the node. For example, this visitor method
|
|
46
|
-
matches all ``Statement`` nodes::
|
|
47
|
-
|
|
48
|
-
def visit_Statement(self, node):
|
|
49
|
-
...
|
|
50
|
-
"""
|
|
51
|
-
|
|
52
|
-
def visit(self, node: Node):
|
|
53
|
-
visitor = self._find_visitor(type(node)) or self.generic_visit
|
|
54
|
-
visitor(node)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class ModelTransformer(ast.NodeTransformer, VisitorFinder):
|
|
58
|
-
"""NodeTransformer that supports matching nodes based on their base classes.
|
|
59
|
-
|
|
60
|
-
See :class:`ModelVisitor` for explanation how this is different compared
|
|
61
|
-
to the standard `ast.NodeTransformer
|
|
62
|
-
<https://docs.python.org/library/ast.html#ast.NodeTransformer>`__.
|
|
63
|
-
"""
|
|
64
|
-
|
|
65
|
-
def visit(self, node: Node):
|
|
66
|
-
visitor = self._find_visitor(type(node)) or self.generic_visit
|
|
67
|
-
return visitor(node)
|
|
@@ -1,183 +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 DataError
|
|
17
|
-
from robot.model import SuiteVisitor, TagPattern
|
|
18
|
-
from robot.utils import Matcher, plural_or_not
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def KeywordRemover(how):
|
|
22
|
-
upper = how.upper()
|
|
23
|
-
if upper.startswith('NAME:'):
|
|
24
|
-
return ByNameKeywordRemover(pattern=how[5:])
|
|
25
|
-
if upper.startswith('TAG:'):
|
|
26
|
-
return ByTagKeywordRemover(pattern=how[4:])
|
|
27
|
-
try:
|
|
28
|
-
return {'ALL': AllKeywordsRemover,
|
|
29
|
-
'PASSED': PassedKeywordRemover,
|
|
30
|
-
'FOR': ForLoopItemsRemover,
|
|
31
|
-
'WHILE': WhileLoopItemsRemover,
|
|
32
|
-
'WUKS': WaitUntilKeywordSucceedsRemover}[upper]()
|
|
33
|
-
except KeyError:
|
|
34
|
-
raise DataError(f"Expected 'ALL', 'PASSED', 'NAME:<pattern>', 'TAG:<pattern>', "
|
|
35
|
-
f"'FOR' or 'WUKS', got '{how}'.")
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class _KeywordRemover(SuiteVisitor):
|
|
39
|
-
_message = 'Keyword data removed using --RemoveKeywords option.'
|
|
40
|
-
|
|
41
|
-
def __init__(self):
|
|
42
|
-
self._removal_message = RemovalMessage(self._message)
|
|
43
|
-
|
|
44
|
-
def _clear_content(self, item):
|
|
45
|
-
item.body.clear()
|
|
46
|
-
self._removal_message.set(item)
|
|
47
|
-
|
|
48
|
-
def _failed_or_warning_or_error(self, item):
|
|
49
|
-
return not item.passed or self._warning_or_error(item)
|
|
50
|
-
|
|
51
|
-
def _warning_or_error(self, item):
|
|
52
|
-
finder = WarningAndErrorFinder()
|
|
53
|
-
item.visit(finder)
|
|
54
|
-
return finder.found
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class AllKeywordsRemover(_KeywordRemover):
|
|
58
|
-
|
|
59
|
-
def visit_keyword(self, keyword):
|
|
60
|
-
self._clear_content(keyword)
|
|
61
|
-
|
|
62
|
-
def visit_for(self, for_):
|
|
63
|
-
self._clear_content(for_)
|
|
64
|
-
|
|
65
|
-
def visit_if_branch(self, branch):
|
|
66
|
-
self._clear_content(branch)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class PassedKeywordRemover(_KeywordRemover):
|
|
70
|
-
|
|
71
|
-
def start_suite(self, suite):
|
|
72
|
-
if not suite.statistics.failed:
|
|
73
|
-
for keyword in suite.setup, suite.teardown:
|
|
74
|
-
if not self._warning_or_error(keyword):
|
|
75
|
-
self._clear_content(keyword)
|
|
76
|
-
|
|
77
|
-
def visit_test(self, test):
|
|
78
|
-
if not self._failed_or_warning_or_error(test):
|
|
79
|
-
for keyword in test.body:
|
|
80
|
-
self._clear_content(keyword)
|
|
81
|
-
|
|
82
|
-
def visit_keyword(self, keyword):
|
|
83
|
-
pass
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class ByNameKeywordRemover(_KeywordRemover):
|
|
87
|
-
|
|
88
|
-
def __init__(self, pattern):
|
|
89
|
-
_KeywordRemover.__init__(self)
|
|
90
|
-
self._matcher = Matcher(pattern, ignore='_')
|
|
91
|
-
|
|
92
|
-
def start_keyword(self, kw):
|
|
93
|
-
if self._matcher.match(kw.name) and not self._warning_or_error(kw):
|
|
94
|
-
self._clear_content(kw)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class ByTagKeywordRemover(_KeywordRemover):
|
|
98
|
-
|
|
99
|
-
def __init__(self, pattern):
|
|
100
|
-
_KeywordRemover.__init__(self)
|
|
101
|
-
self._pattern = TagPattern.from_string(pattern)
|
|
102
|
-
|
|
103
|
-
def start_keyword(self, kw):
|
|
104
|
-
if self._pattern.match(kw.tags) and not self._warning_or_error(kw):
|
|
105
|
-
self._clear_content(kw)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class _LoopItemsRemover(_KeywordRemover):
|
|
109
|
-
_message = '%d passing step%s removed using --RemoveKeywords option.'
|
|
110
|
-
|
|
111
|
-
def _remove_from_loop(self, loop):
|
|
112
|
-
before = len(loop.body)
|
|
113
|
-
self._remove_keywords(loop.body)
|
|
114
|
-
self._removal_message.set_if_removed(loop, before)
|
|
115
|
-
|
|
116
|
-
def _remove_keywords(self, body):
|
|
117
|
-
iterations = body.filter(messages=False)
|
|
118
|
-
for it in iterations[:-1]:
|
|
119
|
-
if not self._failed_or_warning_or_error(it):
|
|
120
|
-
body.remove(it)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
class ForLoopItemsRemover(_LoopItemsRemover):
|
|
124
|
-
|
|
125
|
-
def start_for(self, for_):
|
|
126
|
-
self._remove_from_loop(for_)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
class WhileLoopItemsRemover(_LoopItemsRemover):
|
|
130
|
-
|
|
131
|
-
def start_while(self, while_):
|
|
132
|
-
self._remove_from_loop(while_)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
class WaitUntilKeywordSucceedsRemover(_KeywordRemover):
|
|
136
|
-
_message = '%d failing step%s removed using --RemoveKeywords option.'
|
|
137
|
-
|
|
138
|
-
def start_keyword(self, kw):
|
|
139
|
-
if kw.libname == 'BuiltIn' and kw.kwname == 'Wait Until Keyword Succeeds':
|
|
140
|
-
before = len(kw.body)
|
|
141
|
-
self._remove_keywords(kw.body)
|
|
142
|
-
self._removal_message.set_if_removed(kw, before)
|
|
143
|
-
|
|
144
|
-
def _remove_keywords(self, body):
|
|
145
|
-
keywords = body.filter(messages=False)
|
|
146
|
-
if keywords:
|
|
147
|
-
include_from_end = 2 if keywords[-1].passed else 1
|
|
148
|
-
for kw in keywords[:-include_from_end]:
|
|
149
|
-
if not self._warning_or_error(kw):
|
|
150
|
-
body.remove(kw)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
class WarningAndErrorFinder(SuiteVisitor):
|
|
154
|
-
|
|
155
|
-
def __init__(self):
|
|
156
|
-
self.found = False
|
|
157
|
-
|
|
158
|
-
def start_suite(self, suite):
|
|
159
|
-
return not self.found
|
|
160
|
-
|
|
161
|
-
def start_test(self, test):
|
|
162
|
-
return not self.found
|
|
163
|
-
|
|
164
|
-
def start_keyword(self, keyword):
|
|
165
|
-
return not self.found
|
|
166
|
-
|
|
167
|
-
def visit_message(self, msg):
|
|
168
|
-
if msg.level in ('WARN', 'ERROR'):
|
|
169
|
-
self.found = True
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
class RemovalMessage:
|
|
173
|
-
|
|
174
|
-
def __init__(self, message):
|
|
175
|
-
self._message = message
|
|
176
|
-
|
|
177
|
-
def set_if_removed(self, kw, len_before):
|
|
178
|
-
removed = len_before - len(kw.body)
|
|
179
|
-
if removed:
|
|
180
|
-
self.set(kw, self._message % (removed, plural_or_not(removed)))
|
|
181
|
-
|
|
182
|
-
def set(self, kw, message=None):
|
|
183
|
-
kw.doc = ('%s\n\n_%s_' % (kw.doc, message or self._message)).strip()
|