robotframework 6.1.1__zip → 7.0a1__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework-6.1.1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/interfaces.py +35 -48
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/languages.py +0 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +13 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/configurer.py +15 -11
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/control.py +151 -81
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testsuite.py +16 -22
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +175 -213
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +8 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/model.py +109 -32
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +15 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +33 -40
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/tasks.py +6 -6
- robotframework-6.1.1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1.1/src/robot/model/keyword.py +0 -173
- robotframework-6.1.1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1.1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1.1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1.1/src/robot/output/listeners.py +0 -174
- robotframework-6.1.1/src/robot/output/output.py +0 -95
- robotframework-6.1.1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1.1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1.1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1.1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1.1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1.1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modelobject.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modifier.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/run.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -35,18 +35,18 @@ IMPORTER = Importer()
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class Namespace:
|
|
38
|
-
_default_libraries = ('BuiltIn', '
|
|
38
|
+
_default_libraries = ('BuiltIn', 'Easter')
|
|
39
39
|
_library_import_by_path_ends = ('.py', '/', os.sep)
|
|
40
40
|
_variables_import_by_path_ends = _library_import_by_path_ends + ('.yaml', '.yml') + ('.json',)
|
|
41
41
|
|
|
42
42
|
def __init__(self, variables, suite, resource, languages):
|
|
43
|
-
LOGGER.info(f"Initializing namespace for suite '{suite.
|
|
43
|
+
LOGGER.info(f"Initializing namespace for suite '{suite.full_name}'.")
|
|
44
44
|
self.variables = variables
|
|
45
45
|
self.languages = languages
|
|
46
46
|
self._imports = resource.imports
|
|
47
47
|
self._kw_store = KeywordStore(resource, languages)
|
|
48
48
|
self._imported_variable_files = ImportCache()
|
|
49
|
-
self._suite_name = suite.
|
|
49
|
+
self._suite_name = suite.full_name
|
|
50
50
|
self._running_test = False
|
|
51
51
|
|
|
52
52
|
@property
|
|
@@ -68,7 +68,7 @@ class Namespace:
|
|
|
68
68
|
raise DataError(f'{item.setting_name} setting requires value.')
|
|
69
69
|
self._import(item)
|
|
70
70
|
except DataError as err:
|
|
71
|
-
item.
|
|
71
|
+
item.report_error(err.message)
|
|
72
72
|
|
|
73
73
|
def _import(self, import_setting):
|
|
74
74
|
action = import_setting.select(self._import_library,
|
|
@@ -84,7 +84,7 @@ class Namespace:
|
|
|
84
84
|
self._validate_not_importing_init_file(path)
|
|
85
85
|
if overwrite or path not in self._kw_store.resources:
|
|
86
86
|
resource = IMPORTER.import_resource(path, self.languages)
|
|
87
|
-
self.variables.
|
|
87
|
+
self.variables.set_from_variable_section(resource.variables, overwrite)
|
|
88
88
|
user_library = UserLibrary(resource)
|
|
89
89
|
self._kw_store.resources[path] = user_library
|
|
90
90
|
self._handle_imports(resource.imports)
|
|
@@ -203,15 +203,15 @@ class Namespace:
|
|
|
203
203
|
def end_user_keyword(self):
|
|
204
204
|
self.variables.end_keyword()
|
|
205
205
|
|
|
206
|
-
def get_library_instance(self,
|
|
207
|
-
return self._kw_store.get_library(
|
|
206
|
+
def get_library_instance(self, name):
|
|
207
|
+
return self._kw_store.get_library(name).get_instance()
|
|
208
208
|
|
|
209
209
|
def get_library_instances(self):
|
|
210
210
|
return dict((name, lib.get_instance())
|
|
211
211
|
for name, lib in self._kw_store.libraries.items())
|
|
212
212
|
|
|
213
|
-
def reload_library(self,
|
|
214
|
-
library = self._kw_store.get_library(
|
|
213
|
+
def reload_library(self, name_or_instance):
|
|
214
|
+
library = self._kw_store.get_library(name_or_instance)
|
|
215
215
|
library.reload()
|
|
216
216
|
return library
|
|
217
217
|
|
|
@@ -328,7 +328,7 @@ class KeywordStore:
|
|
|
328
328
|
if caller and runner.source != caller.source:
|
|
329
329
|
if self._exists_in_resource_file(name, caller.source):
|
|
330
330
|
message = (
|
|
331
|
-
f"Keyword '{caller.
|
|
331
|
+
f"Keyword '{caller.full_name}' called keyword '{name}' that exists "
|
|
332
332
|
f"both in the same resource file as the caller and in the suite "
|
|
333
333
|
f"file using that resource. The keyword in the suite file is used "
|
|
334
334
|
f"now, but this will change in Robot Framework 7.0."
|
|
@@ -409,8 +409,8 @@ class KeywordStore:
|
|
|
409
409
|
return matches or handlers
|
|
410
410
|
|
|
411
411
|
def _filter_based_on_search_order(self, handlers):
|
|
412
|
-
for
|
|
413
|
-
matches = [hand for hand in handlers if eq(
|
|
412
|
+
for name in self.search_order:
|
|
413
|
+
matches = [hand for hand in handlers if eq(name, hand.owner)]
|
|
414
414
|
if matches:
|
|
415
415
|
return matches
|
|
416
416
|
return handlers
|
|
@@ -441,7 +441,7 @@ class KeywordStore:
|
|
|
441
441
|
f"'{custom.library.orig_name}'{custom_with_name} and a standard library "
|
|
442
442
|
f"'{standard.library.orig_name}'{standard_with_name}. The custom keyword "
|
|
443
443
|
f"is used. To select explicitly, and to get rid of this warning, use "
|
|
444
|
-
f"either '{custom.
|
|
444
|
+
f"either '{custom.full_name}' or '{standard.full_name}'.", level='WARN'
|
|
445
445
|
)
|
|
446
446
|
|
|
447
447
|
def _get_explicit_runner(self, name):
|
|
@@ -475,7 +475,7 @@ class KeywordStore:
|
|
|
475
475
|
error = f"Multiple keywords with name '{name}' found"
|
|
476
476
|
if implicit:
|
|
477
477
|
error += ". Give the full name of the keyword you want to use"
|
|
478
|
-
names = sorted(hand.
|
|
478
|
+
names = sorted(hand.full_name for hand in handlers)
|
|
479
479
|
raise KeywordError('\n '.join([error+':'] + names))
|
|
480
480
|
|
|
481
481
|
|
|
@@ -511,9 +511,8 @@ class KeywordRecommendationFinder:
|
|
|
511
511
|
handlers = [('', printable_name(handler.name, True))
|
|
512
512
|
for handler in self.user_keywords.handlers]
|
|
513
513
|
for library in chain(self.libraries.values(), self.resources.values()):
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
for handler in library.handlers))
|
|
514
|
+
handlers.extend(
|
|
515
|
+
((library.name or '',
|
|
516
|
+
printable_name(handler.name, code_style=True))
|
|
517
|
+
for handler in library.handlers))
|
|
519
518
|
return sorted(handlers)
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
HandlerExecutionFailed)
|
|
18
|
-
from robot.utils import ErrorDetails, get_timestamp
|
|
16
|
+
from datetime import datetime
|
|
19
17
|
|
|
20
|
-
from .
|
|
18
|
+
from robot.errors import (BreakLoop, ContinueLoop, DataError, ExecutionFailed,
|
|
19
|
+
ExecutionStatus, HandlerExecutionFailed, ReturnFromKeyword)
|
|
20
|
+
from robot.utils import ErrorDetails
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class StatusReporter:
|
|
@@ -38,16 +38,17 @@ class StatusReporter:
|
|
|
38
38
|
context = self.context
|
|
39
39
|
result = self.result
|
|
40
40
|
self.initial_test_status = context.test.status if context.test else None
|
|
41
|
-
if not result.
|
|
42
|
-
result.
|
|
43
|
-
context.
|
|
44
|
-
|
|
41
|
+
if not result.start_time:
|
|
42
|
+
result.start_time = datetime.now()
|
|
43
|
+
context.start_body_item(self.data, result)
|
|
44
|
+
if result.type in result.KEYWORD_TYPES:
|
|
45
|
+
self._warn_if_deprecated(result.doc, result.full_name)
|
|
45
46
|
return self
|
|
46
47
|
|
|
47
48
|
def _warn_if_deprecated(self, doc, name):
|
|
48
49
|
if doc.startswith('*DEPRECATED') and '*' in doc[1:]:
|
|
49
50
|
message = ' ' + doc.split('*', 2)[-1].strip()
|
|
50
|
-
self.context.warn("Keyword '
|
|
51
|
+
self.context.warn(f"Keyword '{name}' is deprecated.{message}")
|
|
51
52
|
|
|
52
53
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
53
54
|
context = self.context
|
|
@@ -57,12 +58,12 @@ class StatusReporter:
|
|
|
57
58
|
result.status = self.pass_status
|
|
58
59
|
else:
|
|
59
60
|
result.status = failure.status
|
|
60
|
-
if
|
|
61
|
+
if not isinstance(failure, (BreakLoop, ContinueLoop, ReturnFromKeyword)):
|
|
61
62
|
result.message = failure.message
|
|
62
63
|
if self.initial_test_status == 'PASS':
|
|
63
64
|
context.test.status = result.status
|
|
64
|
-
result.
|
|
65
|
-
context.
|
|
65
|
+
result.elapsed_time = datetime.now() - result.start_time
|
|
66
|
+
context.end_body_item(self.data, result)
|
|
66
67
|
if failure is not exc_val and not self.suppress:
|
|
67
68
|
raise failure
|
|
68
69
|
return self.suppress
|
|
@@ -13,15 +13,16 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
+
from datetime import datetime
|
|
17
|
+
|
|
16
18
|
from robot.errors import ExecutionFailed, ExecutionStatus, DataError, PassExecution
|
|
17
19
|
from robot.model import SuiteVisitor, TagPatterns
|
|
18
20
|
from robot.result import TestSuite, Result
|
|
19
|
-
from robot.utils import
|
|
21
|
+
from robot.utils import is_list_like, NormalizedDict, test_or_task
|
|
20
22
|
from robot.variables import VariableScopes
|
|
21
23
|
|
|
22
24
|
from .bodyrunner import BodyRunner, KeywordRunner
|
|
23
25
|
from .context import EXECUTION_CONTEXTS
|
|
24
|
-
from .modelcombiner import ModelCombiner
|
|
25
26
|
from .namespace import Namespace
|
|
26
27
|
from .status import SuiteStatus, TestStatus
|
|
27
28
|
from .timeouts import TestTimeout
|
|
@@ -46,7 +47,7 @@ class SuiteRunner(SuiteVisitor):
|
|
|
46
47
|
def start_suite(self, suite):
|
|
47
48
|
if suite.name in self._executed[-1] and suite.parent.source:
|
|
48
49
|
self._output.warn(f"Multiple suites with name '{suite.name}' executed in "
|
|
49
|
-
f"suite '{suite.parent.
|
|
50
|
+
f"suite '{suite.parent.full_name}'.")
|
|
50
51
|
self._executed[-1][suite.name] = True
|
|
51
52
|
self._executed.append(NormalizedDict(ignore='_'))
|
|
52
53
|
self._output.library_listeners.new_suite_scope()
|
|
@@ -54,7 +55,7 @@ class SuiteRunner(SuiteVisitor):
|
|
|
54
55
|
name=suite.name,
|
|
55
56
|
doc=suite.doc,
|
|
56
57
|
metadata=suite.metadata,
|
|
57
|
-
|
|
58
|
+
start_time=datetime.now(),
|
|
58
59
|
rpa=self._settings.rpa)
|
|
59
60
|
if not self.result:
|
|
60
61
|
self.result = Result(root_suite=result, rpa=self._settings.rpa)
|
|
@@ -69,7 +70,7 @@ class SuiteRunner(SuiteVisitor):
|
|
|
69
70
|
self._settings.skip_teardown_on_exit)
|
|
70
71
|
ns = Namespace(self._variables, result, suite.resource, self._settings.languages)
|
|
71
72
|
ns.start_suite()
|
|
72
|
-
ns.variables.
|
|
73
|
+
ns.variables.set_from_variable_section(suite.resource.variables)
|
|
73
74
|
EXECUTION_CONTEXTS.start_suite(result, ns, self._output,
|
|
74
75
|
self._settings.dry_run)
|
|
75
76
|
self._context.set_suite_variables(result)
|
|
@@ -80,10 +81,7 @@ class SuiteRunner(SuiteVisitor):
|
|
|
80
81
|
result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
|
|
81
82
|
for n, v in result.metadata.items()]
|
|
82
83
|
self._context.set_suite_variables(result)
|
|
83
|
-
self._output.start_suite(
|
|
84
|
-
tests=suite.tests,
|
|
85
|
-
suites=suite.suites,
|
|
86
|
-
test_count=suite.test_count))
|
|
84
|
+
self._output.start_suite(suite, result)
|
|
87
85
|
self._output.register_error_listener(self._suite_status.error_occurred)
|
|
88
86
|
self._run_setup(suite, self._suite_status, run=self._any_test_run(suite))
|
|
89
87
|
|
|
@@ -113,9 +111,9 @@ class SuiteRunner(SuiteVisitor):
|
|
|
113
111
|
self._suite.suite_teardown_skipped(str(failure))
|
|
114
112
|
else:
|
|
115
113
|
self._suite.suite_teardown_failed(str(failure))
|
|
116
|
-
self._suite.
|
|
114
|
+
self._suite.end_time = datetime.now()
|
|
117
115
|
self._suite.message = self._suite_status.message
|
|
118
|
-
self._context.end_suite(
|
|
116
|
+
self._context.end_suite(suite, self._suite)
|
|
119
117
|
self._executed.pop()
|
|
120
118
|
self._suite = self._suite.parent
|
|
121
119
|
self._suite_status = self._suite_status.parent
|
|
@@ -128,16 +126,15 @@ class SuiteRunner(SuiteVisitor):
|
|
|
128
126
|
if test.name in self._executed[-1]:
|
|
129
127
|
self._output.warn(
|
|
130
128
|
test_or_task(f"Multiple {{test}}s with name '{test.name}' executed in "
|
|
131
|
-
f"suite '{test.parent.
|
|
129
|
+
f"suite '{test.parent.full_name}'.", settings.rpa))
|
|
132
130
|
self._executed[-1][test.name] = True
|
|
133
131
|
result = self._suite.tests.create(self._resolve_setting(test.name),
|
|
134
132
|
self._resolve_setting(test.doc),
|
|
135
133
|
self._resolve_setting(test.tags),
|
|
136
134
|
self._get_timeout(test),
|
|
137
135
|
test.lineno,
|
|
138
|
-
|
|
139
|
-
self._context.start_test(result)
|
|
140
|
-
self._output.start_test(ModelCombiner(test, result))
|
|
136
|
+
start_time=datetime.now())
|
|
137
|
+
self._context.start_test(test, result)
|
|
141
138
|
status = TestStatus(self._suite_status, result, settings.skip_on_failure,
|
|
142
139
|
settings.rpa)
|
|
143
140
|
if status.exit:
|
|
@@ -187,9 +184,10 @@ class SuiteRunner(SuiteVisitor):
|
|
|
187
184
|
if status.skip_on_failure_after_tag_changes:
|
|
188
185
|
result.message = status.message or result.message
|
|
189
186
|
result.status = status.status
|
|
190
|
-
result.
|
|
187
|
+
result.end_time = datetime.now()
|
|
191
188
|
failed_before_listeners = result.failed
|
|
192
|
-
|
|
189
|
+
# TODO: can this be removed to context
|
|
190
|
+
self._output.end_test(test, result)
|
|
193
191
|
if result.failed and not failed_before_listeners:
|
|
194
192
|
status.failure_occurred()
|
|
195
193
|
self._context.end_test(result)
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from functools import partial
|
|
17
16
|
import inspect
|
|
18
17
|
import os
|
|
18
|
+
from functools import cached_property, partial
|
|
19
19
|
|
|
20
20
|
from robot.errors import DataError
|
|
21
21
|
from robot.libraries import STDLIBS
|
|
@@ -134,10 +134,9 @@ class _BaseTestLibrary:
|
|
|
134
134
|
def report_error(self, message, details=None, level='ERROR',
|
|
135
135
|
details_level='INFO'):
|
|
136
136
|
prefix = 'Error in' if level in ('ERROR', 'WARN') else 'In'
|
|
137
|
-
self.logger.write("
|
|
138
|
-
level)
|
|
137
|
+
self.logger.write(f"{prefix} library '{self.name}': {message}", level)
|
|
139
138
|
if details:
|
|
140
|
-
self.logger.write('Details:\n
|
|
139
|
+
self.logger.write(f'Details:\n{details}', details_level)
|
|
141
140
|
|
|
142
141
|
def _get_version(self, libcode):
|
|
143
142
|
return self._get_attr(libcode, 'ROBOT_LIBRARY_VERSION') \
|
|
@@ -209,8 +208,8 @@ class _BaseTestLibrary:
|
|
|
209
208
|
except DataError as err:
|
|
210
209
|
self.has_listener = False
|
|
211
210
|
# Error should have information about suite where the
|
|
212
|
-
# problem occurred but we don't have such info here.
|
|
213
|
-
self.report_error("Registering listeners failed:
|
|
211
|
+
# problem occurred, but we don't have such info here.
|
|
212
|
+
self.report_error(f"Registering listeners failed: {err}")
|
|
214
213
|
|
|
215
214
|
def unregister_listeners(self, close=False):
|
|
216
215
|
if self.has_listener:
|
|
@@ -231,16 +230,16 @@ class _BaseTestLibrary:
|
|
|
231
230
|
except Exception:
|
|
232
231
|
message, details = get_error_details()
|
|
233
232
|
name = getattr(listener, '__name__', None) or type_name(listener)
|
|
234
|
-
self.report_error("Calling method '
|
|
235
|
-
|
|
233
|
+
self.report_error(f"Calling method '{method.__name__}' of listener "
|
|
234
|
+
f"'{name}' failed: {message}", details)
|
|
236
235
|
|
|
237
236
|
def _create_handlers(self, libcode):
|
|
238
237
|
try:
|
|
239
238
|
names = self._get_handler_names(libcode)
|
|
240
239
|
except Exception:
|
|
241
240
|
message, details = get_error_details()
|
|
242
|
-
raise DataError("Getting keyword names from library '
|
|
243
|
-
|
|
241
|
+
raise DataError(f"Getting keyword names from library '{self.name}' "
|
|
242
|
+
f"failed: {message}", details)
|
|
244
243
|
for name in names:
|
|
245
244
|
method = self._try_to_get_handler_method(libcode, name)
|
|
246
245
|
if method:
|
|
@@ -251,15 +250,12 @@ class _BaseTestLibrary:
|
|
|
251
250
|
except DataError as err:
|
|
252
251
|
self._adding_keyword_failed(handler.name, err)
|
|
253
252
|
else:
|
|
254
|
-
self.logger.debug("Created keyword '
|
|
253
|
+
self.logger.debug(f"Created keyword '{handler.name}'.")
|
|
255
254
|
|
|
256
255
|
def _get_handler_names(self, libcode):
|
|
257
256
|
def has_robot_name(name):
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
except DataError:
|
|
261
|
-
return False
|
|
262
|
-
return hasattr(handler, 'robot_name')
|
|
257
|
+
candidate = inspect.getattr_static(libcode, name)
|
|
258
|
+
return hasattr(candidate, 'robot_name')
|
|
263
259
|
|
|
264
260
|
auto_keywords = getattr(libcode, 'ROBOT_AUTO_KEYWORDS', True)
|
|
265
261
|
if auto_keywords:
|
|
@@ -277,7 +273,7 @@ class _BaseTestLibrary:
|
|
|
277
273
|
|
|
278
274
|
def _adding_keyword_failed(self, name, error, level='ERROR'):
|
|
279
275
|
self.report_error(
|
|
280
|
-
"Adding keyword '
|
|
276
|
+
f"Adding keyword '{name}' failed: {error}",
|
|
281
277
|
error.details,
|
|
282
278
|
level=level,
|
|
283
279
|
details_level='DEBUG'
|
|
@@ -317,41 +313,38 @@ class _BaseTestLibrary:
|
|
|
317
313
|
def _get_possible_embedded_args_handler(self, handler):
|
|
318
314
|
embedded = EmbeddedArguments.from_name(handler.name)
|
|
319
315
|
if embedded:
|
|
320
|
-
|
|
316
|
+
if len(embedded.args) > handler.arguments.maxargs:
|
|
317
|
+
raise DataError(f'Keyword must accept at least as many positional '
|
|
318
|
+
f'arguments as it has embedded arguments.')
|
|
319
|
+
handler.arguments.embedded = embedded.args
|
|
321
320
|
return EmbeddedArgumentsHandler(embedded, handler), True
|
|
322
321
|
return handler, False
|
|
323
322
|
|
|
324
|
-
def _validate_embedded_count(self, embedded, arguments):
|
|
325
|
-
if not (arguments.minargs <= len(embedded.args) <= arguments.maxargs):
|
|
326
|
-
raise DataError('Embedded argument count does not match number of '
|
|
327
|
-
'accepted arguments.')
|
|
328
|
-
|
|
329
323
|
def _raise_creating_instance_failed(self):
|
|
330
|
-
|
|
324
|
+
message, details = get_error_details()
|
|
331
325
|
if self.positional_args or self.named_args:
|
|
332
|
-
args = self.positional_args + ['
|
|
333
|
-
args_text = 'arguments
|
|
326
|
+
args = self.positional_args + [f'{n}={v}' for n, v in self.named_args]
|
|
327
|
+
args_text = f'arguments {seq2str2(args)}'
|
|
334
328
|
else:
|
|
335
329
|
args_text = 'no arguments'
|
|
336
|
-
raise DataError("Initializing library '
|
|
337
|
-
|
|
330
|
+
raise DataError(f"Initializing library '{self.name}' with {args_text} failed: "
|
|
331
|
+
f"{message}\n{details}")
|
|
338
332
|
|
|
339
333
|
|
|
340
334
|
class _ClassLibrary(_BaseTestLibrary):
|
|
341
335
|
|
|
342
336
|
def _get_handler_method(self, libinst, name):
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
raise DataError('Not a method or function.')
|
|
337
|
+
candidate = inspect.getattr_static(libinst, name)
|
|
338
|
+
if isinstance(candidate, classmethod):
|
|
339
|
+
candidate = candidate.__func__
|
|
340
|
+
if isinstance(candidate, cached_property) or not inspect.isroutine(candidate):
|
|
341
|
+
raise DataError('Not a method or function.')
|
|
342
|
+
try:
|
|
343
|
+
method = getattr(libinst, name)
|
|
344
|
+
except Exception:
|
|
345
|
+
message, details = get_error_details()
|
|
346
|
+
raise DataError(f'Getting handler method failed: {message}', details)
|
|
347
|
+
return self._validate_handler_method(method)
|
|
355
348
|
|
|
356
349
|
|
|
357
350
|
class _ModuleLibrary(_BaseTestLibrary):
|
|
@@ -30,17 +30,17 @@ class UserErrorHandler:
|
|
|
30
30
|
"""
|
|
31
31
|
supports_embedded_arguments = False
|
|
32
32
|
|
|
33
|
-
def __init__(self, error, name,
|
|
33
|
+
def __init__(self, error, name, owner=None, source=None, lineno=None):
|
|
34
34
|
"""
|
|
35
35
|
:param robot.errors.DataError error: Occurred error.
|
|
36
36
|
:param str name: Name of the affected keyword.
|
|
37
|
-
:param str
|
|
37
|
+
:param str owner: Name of the affected library or resource.
|
|
38
38
|
:param str source: Path to the source file.
|
|
39
39
|
:param int lineno: Line number of the failing keyword.
|
|
40
40
|
"""
|
|
41
41
|
self.error = error
|
|
42
42
|
self.name = name
|
|
43
|
-
self.
|
|
43
|
+
self.owner = owner
|
|
44
44
|
self.source = source
|
|
45
45
|
self.lineno = lineno
|
|
46
46
|
self.arguments = ArgumentSpec()
|
|
@@ -48,23 +48,23 @@ class UserErrorHandler:
|
|
|
48
48
|
self.tags = Tags()
|
|
49
49
|
|
|
50
50
|
@property
|
|
51
|
-
def
|
|
52
|
-
return f'{self.
|
|
51
|
+
def full_name(self):
|
|
52
|
+
return f'{self.owner}.{self.name}' if self.owner else self.name
|
|
53
53
|
|
|
54
54
|
@property
|
|
55
55
|
def doc(self):
|
|
56
56
|
return f'*Creating keyword failed:* {self.error}'
|
|
57
57
|
|
|
58
58
|
@property
|
|
59
|
-
def
|
|
59
|
+
def short_doc(self):
|
|
60
60
|
return self.doc.splitlines()[0]
|
|
61
61
|
|
|
62
62
|
def create_runner(self, name, languages=None):
|
|
63
63
|
return self
|
|
64
64
|
|
|
65
65
|
def run(self, kw, context, run=True):
|
|
66
|
-
result = KeywordResult(
|
|
67
|
-
|
|
66
|
+
result = KeywordResult(name=self.name,
|
|
67
|
+
owner=self.owner,
|
|
68
68
|
args=kw.args,
|
|
69
69
|
assign=tuple(VariableAssignment(kw.assign)),
|
|
70
70
|
type=kw.type)
|
|
@@ -49,6 +49,10 @@ class UserLibrary:
|
|
|
49
49
|
def _create_handler(self, kw):
|
|
50
50
|
if kw.error:
|
|
51
51
|
raise DataError(kw.error)
|
|
52
|
+
if not kw.body and not kw.return_:
|
|
53
|
+
raise DataError('User keyword cannot be empty.')
|
|
54
|
+
if not kw.name:
|
|
55
|
+
raise DataError('User keyword name cannot be empty.')
|
|
52
56
|
embedded = EmbeddedArguments.from_name(kw.name)
|
|
53
57
|
if not embedded:
|
|
54
58
|
return UserKeywordHandler(kw, self.name)
|
|
@@ -67,26 +71,27 @@ class UserLibrary:
|
|
|
67
71
|
class UserKeywordHandler:
|
|
68
72
|
supports_embedded_args = False
|
|
69
73
|
|
|
70
|
-
def __init__(self, keyword,
|
|
74
|
+
def __init__(self, keyword, owner):
|
|
71
75
|
self.name = keyword.name
|
|
72
|
-
self.
|
|
76
|
+
self.owner = owner
|
|
73
77
|
self.doc = keyword.doc
|
|
74
78
|
self.source = keyword.source
|
|
75
79
|
self.lineno = keyword.lineno
|
|
76
80
|
self.tags = keyword.tags
|
|
77
81
|
self.arguments = UserKeywordArgumentParser().parse(tuple(keyword.args),
|
|
78
|
-
self.
|
|
82
|
+
self.full_name)
|
|
79
83
|
self.timeout = keyword.timeout
|
|
80
84
|
self.body = keyword.body
|
|
81
85
|
self.return_value = tuple(keyword.return_)
|
|
86
|
+
self.setup = keyword.setup if keyword.has_setup else None
|
|
82
87
|
self.teardown = keyword.teardown if keyword.has_teardown else None
|
|
83
88
|
|
|
84
89
|
@property
|
|
85
|
-
def
|
|
86
|
-
return '
|
|
90
|
+
def full_name(self):
|
|
91
|
+
return f'{self.owner}.{self.name}' if self.owner else self.name
|
|
87
92
|
|
|
88
93
|
@property
|
|
89
|
-
def
|
|
94
|
+
def short_doc(self):
|
|
90
95
|
return getshortdoc(self.doc)
|
|
91
96
|
|
|
92
97
|
@property
|
|
@@ -100,8 +105,8 @@ class UserKeywordHandler:
|
|
|
100
105
|
class EmbeddedArgumentsHandler(UserKeywordHandler):
|
|
101
106
|
supports_embedded_args = True
|
|
102
107
|
|
|
103
|
-
def __init__(self, keyword,
|
|
104
|
-
super().__init__(keyword,
|
|
108
|
+
def __init__(self, keyword, owner, embedded):
|
|
109
|
+
super().__init__(keyword, owner)
|
|
105
110
|
self.embedded = embedded
|
|
106
111
|
|
|
107
112
|
def matches(self, name):
|
|
@@ -36,13 +36,9 @@ class UserKeywordRunner:
|
|
|
36
36
|
self.pre_run_messages = ()
|
|
37
37
|
|
|
38
38
|
@property
|
|
39
|
-
def
|
|
40
|
-
|
|
41
|
-
return f'{
|
|
42
|
-
|
|
43
|
-
@property
|
|
44
|
-
def libname(self):
|
|
45
|
-
return self._handler.libname
|
|
39
|
+
def full_name(self):
|
|
40
|
+
owner = self._handler.owner
|
|
41
|
+
return f'{owner}.{self.name}' if owner else self.name
|
|
46
42
|
|
|
47
43
|
@property
|
|
48
44
|
def tags(self):
|
|
@@ -74,8 +70,8 @@ class UserKeywordRunner:
|
|
|
74
70
|
doc = variables.replace_string(handler.doc, ignore_errors=True)
|
|
75
71
|
doc, tags = split_tags_from_doc(doc)
|
|
76
72
|
tags = variables.replace_list(handler.tags, ignore_errors=True) + tags
|
|
77
|
-
return KeywordResult(
|
|
78
|
-
|
|
73
|
+
return KeywordResult(name=self.name,
|
|
74
|
+
owner=handler.owner,
|
|
79
75
|
doc=getshortdoc(doc),
|
|
80
76
|
args=kw.args,
|
|
81
77
|
assign=tuple(assignment),
|
|
@@ -148,7 +144,8 @@ class UserKeywordRunner:
|
|
|
148
144
|
|
|
149
145
|
def _trace_log_args_message(self, variables):
|
|
150
146
|
return self._format_trace_log_args_message(
|
|
151
|
-
self._format_args_for_trace_logging(), variables
|
|
147
|
+
self._format_args_for_trace_logging(), variables
|
|
148
|
+
)
|
|
152
149
|
|
|
153
150
|
def _format_args_for_trace_logging(self):
|
|
154
151
|
args = [f'${{{arg}}}' for arg in self.arguments.positional]
|
|
@@ -167,8 +164,10 @@ class UserKeywordRunner:
|
|
|
167
164
|
if context.dry_run and handler.tags.robot('no-dry-run'):
|
|
168
165
|
return None, None
|
|
169
166
|
error = return_ = pass_ = None
|
|
167
|
+
if handler.setup:
|
|
168
|
+
error = self._run_setup_or_teardown(handler.setup, context)
|
|
170
169
|
try:
|
|
171
|
-
BodyRunner(context).run(handler.body)
|
|
170
|
+
BodyRunner(context, run=not error).run(handler.body)
|
|
172
171
|
except ReturnFromKeyword as exception:
|
|
173
172
|
return_ = exception
|
|
174
173
|
error = exception.earlier_failures
|
|
@@ -183,7 +182,7 @@ class UserKeywordRunner:
|
|
|
183
182
|
error = exception
|
|
184
183
|
if handler.teardown:
|
|
185
184
|
with context.keyword_teardown(error):
|
|
186
|
-
td_error = self.
|
|
185
|
+
td_error = self._run_setup_or_teardown(handler.teardown, context)
|
|
187
186
|
else:
|
|
188
187
|
td_error = None
|
|
189
188
|
if error or td_error:
|
|
@@ -204,9 +203,9 @@ class UserKeywordRunner:
|
|
|
204
203
|
return ret
|
|
205
204
|
return ret[0]
|
|
206
205
|
|
|
207
|
-
def
|
|
206
|
+
def _run_setup_or_teardown(self, item, context):
|
|
208
207
|
try:
|
|
209
|
-
name = context.variables.replace_string(
|
|
208
|
+
name = context.variables.replace_string(item.name)
|
|
210
209
|
except DataError as err:
|
|
211
210
|
if context.dry_run:
|
|
212
211
|
return None
|
|
@@ -214,7 +213,7 @@ class UserKeywordRunner:
|
|
|
214
213
|
if name.upper() in ('', 'NONE'):
|
|
215
214
|
return None
|
|
216
215
|
try:
|
|
217
|
-
KeywordRunner(context).run(
|
|
216
|
+
KeywordRunner(context).run(item, name)
|
|
218
217
|
except PassExecution:
|
|
219
218
|
return None
|
|
220
219
|
except ExecutionStatus as err:
|
|
@@ -249,19 +248,17 @@ class EmbeddedArgumentsRunner(UserKeywordRunner):
|
|
|
249
248
|
self.embedded_args = handler.embedded.match(name).groups()
|
|
250
249
|
|
|
251
250
|
def _resolve_arguments(self, args, variables=None):
|
|
252
|
-
|
|
251
|
+
result = super()._resolve_arguments(args, variables)
|
|
253
252
|
if variables:
|
|
254
253
|
embedded = [variables.replace_scalar(e) for e in self.embedded_args]
|
|
255
254
|
self.embedded_args = self._handler.embedded.map(embedded)
|
|
256
|
-
return
|
|
255
|
+
return result
|
|
257
256
|
|
|
258
257
|
def _set_arguments(self, args, context):
|
|
259
258
|
variables = context.variables
|
|
260
259
|
for name, value in self.embedded_args:
|
|
261
260
|
variables[f'${{{name}}}'] = value
|
|
262
261
|
super()._set_arguments(args, context)
|
|
263
|
-
context.output.trace(lambda: self._trace_log_args_message(variables),
|
|
264
|
-
write_if_flat=False)
|
|
265
262
|
|
|
266
263
|
def _trace_log_args_message(self, variables):
|
|
267
264
|
args = [f'${{{arg}}}' for arg in self._handler.embedded.args]
|
|
@@ -269,6 +266,6 @@ class EmbeddedArgumentsRunner(UserKeywordRunner):
|
|
|
269
266
|
return self._format_trace_log_args_message(args, variables)
|
|
270
267
|
|
|
271
268
|
def _get_result(self, kw, assignment, variables):
|
|
272
|
-
result =
|
|
273
|
-
result.
|
|
269
|
+
result = super()._get_result(kw, assignment, variables)
|
|
270
|
+
result.source_name = self._handler.name
|
|
274
271
|
return result
|