robotframework 6.1rc1__zip → 7.0a1__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework-6.1rc1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/interfaces.py +36 -49
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/control.py +155 -85
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modelobject.py +2 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testsuite.py +43 -24
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/run.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +210 -220
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +15 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +15 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/model.py +156 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +35 -39
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1rc1/src/robot/model/keyword.py +0 -173
- robotframework-6.1rc1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1rc1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1rc1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1rc1/src/robot/output/listeners.py +0 -174
- robotframework-6.1rc1/src/robot/output/output.py +0 -95
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
import sys
|
|
17
16
|
import inspect
|
|
18
17
|
import asyncio
|
|
19
18
|
from contextlib import contextmanager
|
|
@@ -43,9 +42,6 @@ class Asynchronous:
|
|
|
43
42
|
return inspect.iscoroutine(obj) and not self._is_loop_running()
|
|
44
43
|
|
|
45
44
|
def _is_loop_running(self):
|
|
46
|
-
# ensure 3.6 compatibility
|
|
47
|
-
if sys.version_info.minor == 6:
|
|
48
|
-
return asyncio._get_running_loop() is not None
|
|
49
45
|
try:
|
|
50
46
|
asyncio.get_running_loop()
|
|
51
47
|
except RuntimeError:
|
|
@@ -150,7 +146,7 @@ class _ExecutionContext:
|
|
|
150
146
|
def warn_on_invalid_private_call(self, handler):
|
|
151
147
|
parent = self.user_keywords[-1] if self.user_keywords else None
|
|
152
148
|
if not parent or parent.source != handler.source:
|
|
153
|
-
self.warn(f"Keyword '{handler.
|
|
149
|
+
self.warn(f"Keyword '{handler.full_name}' is private and should only "
|
|
154
150
|
f"be called by keywords in the same file.")
|
|
155
151
|
|
|
156
152
|
@contextmanager
|
|
@@ -184,24 +180,24 @@ class _ExecutionContext:
|
|
|
184
180
|
|
|
185
181
|
@property
|
|
186
182
|
def allow_loop_control(self):
|
|
187
|
-
for step in reversed(self.steps):
|
|
183
|
+
for _, step in reversed(self.steps):
|
|
188
184
|
if step.type == 'ITERATION':
|
|
189
185
|
return True
|
|
190
|
-
if step.type == 'KEYWORD' and step.
|
|
186
|
+
if step.type == 'KEYWORD' and step.owner != 'BuiltIn':
|
|
191
187
|
return False
|
|
192
188
|
return False
|
|
193
189
|
|
|
194
|
-
def end_suite(self,
|
|
190
|
+
def end_suite(self, data, result):
|
|
195
191
|
for name in ['${PREV_TEST_NAME}',
|
|
196
192
|
'${PREV_TEST_STATUS}',
|
|
197
193
|
'${PREV_TEST_MESSAGE}']:
|
|
198
194
|
self.variables.set_global(name, self.variables[name])
|
|
199
|
-
self.output.end_suite(
|
|
200
|
-
self.namespace.end_suite(
|
|
195
|
+
self.output.end_suite(data, result)
|
|
196
|
+
self.namespace.end_suite(data)
|
|
201
197
|
EXECUTION_CONTEXTS.end_suite()
|
|
202
198
|
|
|
203
199
|
def set_suite_variables(self, suite):
|
|
204
|
-
self.variables['${SUITE_NAME}'] = suite.
|
|
200
|
+
self.variables['${SUITE_NAME}'] = suite.full_name
|
|
205
201
|
self.variables['${SUITE_SOURCE}'] = str(suite.source or '')
|
|
206
202
|
self.variables['${SUITE_DOCUMENTATION}'] = suite.doc
|
|
207
203
|
self.variables['${SUITE_METADATA}'] = suite.metadata.copy()
|
|
@@ -210,13 +206,14 @@ class _ExecutionContext:
|
|
|
210
206
|
self.variables['${SUITE_STATUS}'] = status
|
|
211
207
|
self.variables['${SUITE_MESSAGE}'] = message
|
|
212
208
|
|
|
213
|
-
def start_test(self,
|
|
214
|
-
self.test =
|
|
215
|
-
self._add_timeout(
|
|
209
|
+
def start_test(self, data, result):
|
|
210
|
+
self.test = result
|
|
211
|
+
self._add_timeout(result.timeout)
|
|
216
212
|
self.namespace.start_test()
|
|
217
|
-
self.variables.set_test('${TEST_NAME}',
|
|
218
|
-
self.variables.set_test('${TEST_DOCUMENTATION}',
|
|
219
|
-
self.variables.set_test('@{TEST_TAGS}', list(
|
|
213
|
+
self.variables.set_test('${TEST_NAME}', result.name)
|
|
214
|
+
self.variables.set_test('${TEST_DOCUMENTATION}', result.doc)
|
|
215
|
+
self.variables.set_test('@{TEST_TAGS}', list(result.tags))
|
|
216
|
+
self.output.start_test(data, result)
|
|
220
217
|
|
|
221
218
|
def _add_timeout(self, timeout):
|
|
222
219
|
if timeout:
|
|
@@ -236,19 +233,77 @@ class _ExecutionContext:
|
|
|
236
233
|
self.variables.set_suite('${PREV_TEST_MESSAGE}', test.message)
|
|
237
234
|
self.timeout_occurred = False
|
|
238
235
|
|
|
239
|
-
def
|
|
240
|
-
self.steps.append(
|
|
236
|
+
def start_body_item(self, data, result):
|
|
237
|
+
self.steps.append((data, result))
|
|
241
238
|
if len(self.steps) > self._started_keywords_threshold:
|
|
242
239
|
raise DataError('Maximum limit of started keywords and control '
|
|
243
240
|
'structures exceeded.')
|
|
244
|
-
self.output
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
241
|
+
output = self.output
|
|
242
|
+
if result.type in (result.ELSE, result.ITERATION):
|
|
243
|
+
method = {
|
|
244
|
+
result.IF_ELSE_ROOT: output.start_if_branch,
|
|
245
|
+
result.TRY_EXCEPT_ROOT: output.start_try_branch,
|
|
246
|
+
result.FOR: output.start_for_iteration,
|
|
247
|
+
result.WHILE: output.start_while_iteration,
|
|
248
|
+
}[result.parent.type]
|
|
249
|
+
else:
|
|
250
|
+
method = {
|
|
251
|
+
result.KEYWORD: output.start_keyword,
|
|
252
|
+
result.SETUP: output.start_keyword,
|
|
253
|
+
result.TEARDOWN: output.start_keyword,
|
|
254
|
+
result.FOR: output.start_for,
|
|
255
|
+
result.WHILE: output.start_while,
|
|
256
|
+
result.IF_ELSE_ROOT: output.start_if,
|
|
257
|
+
result.IF: output.start_if_branch,
|
|
258
|
+
result.ELSE: output.start_if_branch,
|
|
259
|
+
result.ELSE_IF: output.start_if_branch,
|
|
260
|
+
result.TRY_EXCEPT_ROOT: output.start_try,
|
|
261
|
+
result.TRY: output.start_try_branch,
|
|
262
|
+
result.EXCEPT: output.start_try_branch,
|
|
263
|
+
result.FINALLY: output.start_try_branch,
|
|
264
|
+
result.VAR: output.start_var,
|
|
265
|
+
result.BREAK: output.start_break,
|
|
266
|
+
result.CONTINUE: output.start_continue,
|
|
267
|
+
result.RETURN: output.start_return,
|
|
268
|
+
result.ERROR: output.start_error,
|
|
269
|
+
}[result.type]
|
|
270
|
+
method(data, result)
|
|
271
|
+
|
|
272
|
+
def end_body_item(self, data, result):
|
|
273
|
+
output = self.output
|
|
274
|
+
if result.type in (result.ELSE, result.ITERATION):
|
|
275
|
+
method = {
|
|
276
|
+
result.IF_ELSE_ROOT: output.end_if_branch,
|
|
277
|
+
result.TRY_EXCEPT_ROOT: output.end_try_branch,
|
|
278
|
+
result.FOR: output.end_for_iteration,
|
|
279
|
+
result.WHILE: output.end_while_iteration,
|
|
280
|
+
}[result.parent.type]
|
|
281
|
+
else:
|
|
282
|
+
method = {
|
|
283
|
+
result.KEYWORD: output.end_keyword,
|
|
284
|
+
result.SETUP: output.end_keyword,
|
|
285
|
+
result.TEARDOWN: output.end_keyword,
|
|
286
|
+
result.FOR: output.end_for,
|
|
287
|
+
result.WHILE: output.end_while,
|
|
288
|
+
result.IF_ELSE_ROOT: output.end_if,
|
|
289
|
+
result.IF: output.end_if_branch,
|
|
290
|
+
result.ELSE: output.end_if_branch,
|
|
291
|
+
result.ELSE_IF: output.end_if_branch,
|
|
292
|
+
result.TRY_EXCEPT_ROOT: output.end_try,
|
|
293
|
+
result.TRY: output.end_try_branch,
|
|
294
|
+
result.EXCEPT: output.end_try_branch,
|
|
295
|
+
result.FINALLY: output.end_try_branch,
|
|
296
|
+
result.VAR: output.end_var,
|
|
297
|
+
result.BREAK: output.end_break,
|
|
298
|
+
result.CONTINUE: output.end_continue,
|
|
299
|
+
result.RETURN: output.end_return,
|
|
300
|
+
result.ERROR: output.end_error,
|
|
301
|
+
}[result.type]
|
|
302
|
+
method(data, result)
|
|
248
303
|
self.steps.pop()
|
|
249
304
|
|
|
250
|
-
def get_runner(self, name):
|
|
251
|
-
return self.namespace.get_runner(name)
|
|
305
|
+
def get_runner(self, name, recommend_on_failure=True):
|
|
306
|
+
return self.namespace.get_runner(name, recommend_on_failure)
|
|
252
307
|
|
|
253
308
|
def trace(self, message):
|
|
254
309
|
self.output.trace(message)
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from copy import copy
|
|
17
16
|
import inspect
|
|
17
|
+
from copy import copy
|
|
18
18
|
|
|
19
19
|
from robot.utils import (getdoc, getshortdoc, is_list_like, normpath, printable_name,
|
|
20
20
|
split_tags_from_doc, type_name)
|
|
@@ -91,15 +91,15 @@ class _RunnableHandler:
|
|
|
91
91
|
return self._doc
|
|
92
92
|
|
|
93
93
|
@property
|
|
94
|
-
def
|
|
94
|
+
def full_name(self):
|
|
95
95
|
return f'{self.library.name}.{self.name}'
|
|
96
96
|
|
|
97
97
|
@property
|
|
98
|
-
def
|
|
98
|
+
def short_doc(self):
|
|
99
99
|
return getshortdoc(self.doc)
|
|
100
100
|
|
|
101
101
|
@property
|
|
102
|
-
def
|
|
102
|
+
def owner(self):
|
|
103
103
|
return self.library.name
|
|
104
104
|
|
|
105
105
|
@property
|
|
@@ -137,7 +137,7 @@ class _PythonHandler(_RunnableHandler):
|
|
|
137
137
|
super().__init__(library, handler_name, handler_method, getdoc(handler_method))
|
|
138
138
|
|
|
139
139
|
def _parse_arguments(self, handler_method):
|
|
140
|
-
return PythonArgumentParser().parse(handler_method, self.
|
|
140
|
+
return PythonArgumentParser().parse(handler_method, self.full_name)
|
|
141
141
|
|
|
142
142
|
@property
|
|
143
143
|
def source(self):
|
|
@@ -175,7 +175,7 @@ class _DynamicHandler(_RunnableHandler):
|
|
|
175
175
|
self._source_info = None
|
|
176
176
|
|
|
177
177
|
def _parse_arguments(self, handler_method):
|
|
178
|
-
spec = DynamicArgumentParser().parse(self._argspec, self.
|
|
178
|
+
spec = DynamicArgumentParser().parse(self._argspec, self.full_name)
|
|
179
179
|
if not self._supports_kwargs:
|
|
180
180
|
name = self._run_keyword_method_name
|
|
181
181
|
if spec.var_named:
|
|
@@ -285,7 +285,6 @@ class EmbeddedArgumentsHandler:
|
|
|
285
285
|
supports_embedded_args = True
|
|
286
286
|
|
|
287
287
|
def __init__(self, embedded, orig_handler):
|
|
288
|
-
self.arguments = ArgumentSpec() # Show empty argument spec for Libdoc
|
|
289
288
|
self.embedded = embedded
|
|
290
289
|
self._orig_handler = orig_handler
|
|
291
290
|
|
|
@@ -307,15 +306,11 @@ class EmbeddedArgumentsHandler:
|
|
|
307
306
|
return EmbeddedArgumentsRunner(self, name)
|
|
308
307
|
|
|
309
308
|
def resolve_arguments(self, args, variables=None, languages=None):
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
args = [variables.replace_scalar(a) for a in args]
|
|
316
|
-
self.embedded.validate(args)
|
|
317
|
-
return argspec.convert(args, named={}, converters=self.library.converters,
|
|
318
|
-
dry_run=not variables)
|
|
309
|
+
positional, named = self.arguments.resolve(args, variables,
|
|
310
|
+
self.library.converters,
|
|
311
|
+
languages=languages)
|
|
312
|
+
self.embedded.validate(positional)
|
|
313
|
+
return positional, named
|
|
319
314
|
|
|
320
315
|
def __copy__(self):
|
|
321
316
|
return EmbeddedArgumentsHandler(self.embedded, copy(self._orig_handler))
|
|
@@ -39,12 +39,8 @@ class LibraryKeywordRunner:
|
|
|
39
39
|
return self._handler.library
|
|
40
40
|
|
|
41
41
|
@property
|
|
42
|
-
def
|
|
43
|
-
return self.
|
|
44
|
-
|
|
45
|
-
@property
|
|
46
|
-
def longname(self):
|
|
47
|
-
return '%s.%s' % (self.library.name, self.name)
|
|
42
|
+
def full_name(self):
|
|
43
|
+
return f'{self.library.name}.{self.name}'
|
|
48
44
|
|
|
49
45
|
def run(self, kw, context, run=True):
|
|
50
46
|
assignment = VariableAssignment(kw.assign)
|
|
@@ -58,9 +54,9 @@ class LibraryKeywordRunner:
|
|
|
58
54
|
|
|
59
55
|
def _get_result(self, kw, assignment):
|
|
60
56
|
handler = self._handler
|
|
61
|
-
return KeywordResult(
|
|
62
|
-
|
|
63
|
-
doc=handler.
|
|
57
|
+
return KeywordResult(name=self.name,
|
|
58
|
+
owner=handler.owner,
|
|
59
|
+
doc=handler.short_doc,
|
|
64
60
|
args=kw.args,
|
|
65
61
|
assign=tuple(assignment),
|
|
66
62
|
tags=handler.tags,
|
|
@@ -129,8 +125,7 @@ class LibraryKeywordRunner:
|
|
|
129
125
|
'BuiltIn.Set Library Search Order',
|
|
130
126
|
'BuiltIn.Set Tags',
|
|
131
127
|
'BuiltIn.Remove Tags')
|
|
132
|
-
return
|
|
133
|
-
handler.longname in keywords_to_execute)
|
|
128
|
+
return handler.full_name in keywords_to_execute
|
|
134
129
|
|
|
135
130
|
|
|
136
131
|
class EmbeddedArgumentsRunner(LibraryKeywordRunner):
|
|
@@ -140,17 +135,14 @@ class EmbeddedArgumentsRunner(LibraryKeywordRunner):
|
|
|
140
135
|
self.embedded_args = handler.embedded.match(name).groups()
|
|
141
136
|
|
|
142
137
|
def _run(self, context, args):
|
|
143
|
-
|
|
144
|
-
raise DataError("Positional arguments are not allowed when using "
|
|
145
|
-
"embedded arguments.")
|
|
146
|
-
return super()._run(context, self.embedded_args)
|
|
138
|
+
return super()._run(context, self.embedded_args + args)
|
|
147
139
|
|
|
148
140
|
def _dry_run(self, context, args):
|
|
149
|
-
return super()._dry_run(context, self.embedded_args)
|
|
141
|
+
return super()._dry_run(context, self.embedded_args + args)
|
|
150
142
|
|
|
151
143
|
def _get_result(self, kw, assignment):
|
|
152
144
|
result = super()._get_result(kw, assignment)
|
|
153
|
-
result.
|
|
145
|
+
result.source_name = self._handler.name
|
|
154
146
|
return result
|
|
155
147
|
|
|
156
148
|
|
|
@@ -34,22 +34,19 @@ __ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#
|
|
|
34
34
|
__ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#listener-interface
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
-
import sys
|
|
38
37
|
import warnings
|
|
39
38
|
from pathlib import Path
|
|
40
|
-
from typing import Any, Mapping, Sequence, TYPE_CHECKING, Union
|
|
41
|
-
if sys.version_info >= (3, 8):
|
|
42
|
-
from typing import Literal
|
|
39
|
+
from typing import Any, Literal, Mapping, Sequence, TYPE_CHECKING, Union
|
|
43
40
|
|
|
44
41
|
from robot import model
|
|
45
42
|
from robot.conf import RobotSettings
|
|
46
|
-
from robot.errors import BreakLoop, ContinueLoop, DataError, ReturnFromKeyword
|
|
47
|
-
from robot.model import
|
|
48
|
-
TestCases, TestSuites)
|
|
43
|
+
from robot.errors import BreakLoop, ContinueLoop, DataError, ReturnFromKeyword, VariableError
|
|
44
|
+
from robot.model import BodyItem, create_fixture, DataDict, ModelObject, TestSuites
|
|
49
45
|
from robot.output import LOGGER, Output, pyloggingconf
|
|
50
46
|
from robot.result import (Break as BreakResult, Continue as ContinueResult,
|
|
51
|
-
Error as ErrorResult, Return as ReturnResult)
|
|
47
|
+
Error as ErrorResult, Return as ReturnResult, Var as VarResult)
|
|
52
48
|
from robot.utils import setter
|
|
49
|
+
from robot.variables import VariableResolver
|
|
53
50
|
|
|
54
51
|
from .bodyrunner import ForRunner, IfRunner, KeywordRunner, TryRunner, WhileRunner
|
|
55
52
|
from .randomizer import Randomizer
|
|
@@ -64,8 +61,8 @@ BodyItemParent = Union['TestSuite', 'TestCase', 'UserKeyword', 'For', 'If', 'IfB
|
|
|
64
61
|
'Try', 'TryBranch', 'While', None]
|
|
65
62
|
|
|
66
63
|
|
|
67
|
-
class Body(model.BaseBody['Keyword', 'For', 'While', 'If', 'Try', '
|
|
68
|
-
'Break', 'model.Message', 'Error']):
|
|
64
|
+
class Body(model.BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
|
|
65
|
+
'Continue', 'Break', 'model.Message', 'Error']):
|
|
69
66
|
__slots__ = []
|
|
70
67
|
|
|
71
68
|
|
|
@@ -117,8 +114,8 @@ class For(model.For, WithSource):
|
|
|
117
114
|
__slots__ = ['lineno', 'error']
|
|
118
115
|
body_class = Body
|
|
119
116
|
|
|
120
|
-
def __init__(self,
|
|
121
|
-
flavor:
|
|
117
|
+
def __init__(self, assign: Sequence[str] = (),
|
|
118
|
+
flavor: Literal['IN', 'IN RANGE', 'IN ENUMERATE', 'IN ZIP'] = 'IN',
|
|
122
119
|
values: Sequence[str] = (),
|
|
123
120
|
start: 'str|None' = None,
|
|
124
121
|
mode: 'str|None' = None,
|
|
@@ -126,10 +123,17 @@ class For(model.For, WithSource):
|
|
|
126
123
|
parent: BodyItemParent = None,
|
|
127
124
|
lineno: 'int|None' = None,
|
|
128
125
|
error: 'str|None' = None):
|
|
129
|
-
super().__init__(
|
|
126
|
+
super().__init__(assign, flavor, values, start, mode, fill, parent)
|
|
130
127
|
self.lineno = lineno
|
|
131
128
|
self.error = error
|
|
132
129
|
|
|
130
|
+
@classmethod
|
|
131
|
+
def from_dict(cls, data: DataDict) -> 'For':
|
|
132
|
+
# RF 6.1 compatibility
|
|
133
|
+
if 'variables' in data:
|
|
134
|
+
data['assign'] = data.pop('variables')
|
|
135
|
+
return super().from_dict(data)
|
|
136
|
+
|
|
133
137
|
def to_dict(self) -> DataDict:
|
|
134
138
|
data = super().to_dict()
|
|
135
139
|
if self.lineno:
|
|
@@ -219,12 +223,19 @@ class TryBranch(model.TryBranch, WithSource):
|
|
|
219
223
|
def __init__(self, type: str = BodyItem.TRY,
|
|
220
224
|
patterns: Sequence[str] = (),
|
|
221
225
|
pattern_type: 'str|None' = None,
|
|
222
|
-
|
|
226
|
+
assign: 'str|None' = None,
|
|
223
227
|
parent: BodyItemParent = None,
|
|
224
228
|
lineno: 'int|None' = None):
|
|
225
|
-
super().__init__(type, patterns, pattern_type,
|
|
229
|
+
super().__init__(type, patterns, pattern_type, assign, parent)
|
|
226
230
|
self.lineno = lineno
|
|
227
231
|
|
|
232
|
+
@classmethod
|
|
233
|
+
def from_dict(cls, data: DataDict) -> 'TryBranch':
|
|
234
|
+
# RF 6.1 compatibility.
|
|
235
|
+
if 'variable' in data:
|
|
236
|
+
data['assign'] = data.pop('variable')
|
|
237
|
+
return super().from_dict(data)
|
|
238
|
+
|
|
228
239
|
def to_dict(self) -> DataDict:
|
|
229
240
|
data = super().to_dict()
|
|
230
241
|
if self.lineno:
|
|
@@ -256,6 +267,59 @@ class Try(model.Try, WithSource):
|
|
|
256
267
|
return data
|
|
257
268
|
|
|
258
269
|
|
|
270
|
+
@Body.register
|
|
271
|
+
class Var(model.Var, WithSource):
|
|
272
|
+
__slots__ = ['lineno', 'error']
|
|
273
|
+
|
|
274
|
+
def __init__(self, name: str = '',
|
|
275
|
+
value: 'str|Sequence[str]' = (),
|
|
276
|
+
scope: 'str|None' = None,
|
|
277
|
+
separator: 'str|None' = None,
|
|
278
|
+
parent: BodyItemParent = None,
|
|
279
|
+
lineno: 'int|None' = None,
|
|
280
|
+
error: 'str|None' = None):
|
|
281
|
+
super().__init__(name, value, scope, separator, parent)
|
|
282
|
+
self.lineno = lineno
|
|
283
|
+
self.error = error
|
|
284
|
+
|
|
285
|
+
def run(self, context, run=True, templated=False):
|
|
286
|
+
result = VarResult(self.name, self.value, self.scope, self.separator)
|
|
287
|
+
with StatusReporter(self, result, context, run):
|
|
288
|
+
if run:
|
|
289
|
+
if self.error:
|
|
290
|
+
raise DataError(self.error, syntax=True)
|
|
291
|
+
if not context.dry_run:
|
|
292
|
+
scope = self._get_scope(context.variables)
|
|
293
|
+
setter = getattr(context.variables, f'set_{scope}')
|
|
294
|
+
try:
|
|
295
|
+
resolver = VariableResolver.from_variable(self)
|
|
296
|
+
setter(self.name, resolver.resolve(context.variables))
|
|
297
|
+
except DataError as err:
|
|
298
|
+
raise VariableError(f"Setting variable '{self.name}' failed: {err}")
|
|
299
|
+
|
|
300
|
+
def _get_scope(self, variables):
|
|
301
|
+
if not self.scope:
|
|
302
|
+
return 'local'
|
|
303
|
+
try:
|
|
304
|
+
scope = variables.replace_string(self.scope)
|
|
305
|
+
if scope.upper() == 'TASK':
|
|
306
|
+
return 'test'
|
|
307
|
+
if scope.upper() in ('GLOBAL', 'SUITE', 'TEST', 'LOCAL'):
|
|
308
|
+
return scope.lower()
|
|
309
|
+
raise DataError(f"Value '{scope}' is not accepted. Valid values are "
|
|
310
|
+
f"'GLOBAL', 'SUITE', 'TEST', 'TASK' and 'LOCAL'.")
|
|
311
|
+
except DataError as err:
|
|
312
|
+
raise DataError(f"Invalid VAR scope: {err}")
|
|
313
|
+
|
|
314
|
+
def to_dict(self) -> DataDict:
|
|
315
|
+
data = super().to_dict()
|
|
316
|
+
if self.lineno:
|
|
317
|
+
data['lineno'] = self.lineno
|
|
318
|
+
if self.error:
|
|
319
|
+
data['error'] = self.error
|
|
320
|
+
return data
|
|
321
|
+
|
|
322
|
+
|
|
259
323
|
@Body.register
|
|
260
324
|
class Return(model.Return, WithSource):
|
|
261
325
|
__slots__ = ['lineno', 'error']
|
|
@@ -362,8 +426,7 @@ class Error(model.Error, WithSource):
|
|
|
362
426
|
data = super().to_dict()
|
|
363
427
|
if self.lineno:
|
|
364
428
|
data['lineno'] = self.lineno
|
|
365
|
-
|
|
366
|
-
data['error'] = self.error
|
|
429
|
+
data['error'] = self.error
|
|
367
430
|
return data
|
|
368
431
|
|
|
369
432
|
|
|
@@ -417,7 +480,7 @@ class TestSuite(model.TestSuite[Keyword, TestCase]):
|
|
|
417
480
|
doc: str = '',
|
|
418
481
|
metadata: 'Mapping[str, str]|None' = None,
|
|
419
482
|
source: 'Path|str|None' = None,
|
|
420
|
-
rpa: 'bool|None' =
|
|
483
|
+
rpa: 'bool|None' = False,
|
|
421
484
|
parent: 'TestSuite|None' = None):
|
|
422
485
|
super().__init__(name, doc, metadata, source, rpa, parent)
|
|
423
486
|
#: :class:`ResourceFile` instance containing imports, variables and
|
|
@@ -556,7 +619,7 @@ class TestSuite(model.TestSuite[Keyword, TestCase]):
|
|
|
556
619
|
If such an option is used only once, it can be given also as a single
|
|
557
620
|
string like ``variable='VAR:value'``.
|
|
558
621
|
|
|
559
|
-
Additionally listener option allows passing object directly instead of
|
|
622
|
+
Additionally, listener option allows passing object directly instead of
|
|
560
623
|
listener name, e.g. ``run('tests.robot', listener=Listener())``.
|
|
561
624
|
|
|
562
625
|
To capture stdout and/or stderr streams, pass open file objects in as
|
|
@@ -615,15 +678,17 @@ class TestSuite(model.TestSuite[Keyword, TestCase]):
|
|
|
615
678
|
|
|
616
679
|
|
|
617
680
|
class Variable(ModelObject):
|
|
618
|
-
repr_args = ('name', 'value')
|
|
681
|
+
repr_args = ('name', 'value', 'separator')
|
|
619
682
|
|
|
620
683
|
def __init__(self, name: str = '',
|
|
621
684
|
value: Sequence[str] = (),
|
|
685
|
+
separator: 'str|None' = None,
|
|
622
686
|
parent: 'ResourceFile|None' = None,
|
|
623
687
|
lineno: 'int|None' = None,
|
|
624
688
|
error: 'str|None' = None):
|
|
625
689
|
self.name = name
|
|
626
690
|
self.value = tuple(value)
|
|
691
|
+
self.separator = separator
|
|
627
692
|
self.parent = parent
|
|
628
693
|
self.lineno = lineno
|
|
629
694
|
self.error = error
|
|
@@ -632,7 +697,7 @@ class Variable(ModelObject):
|
|
|
632
697
|
def source(self) -> 'Path|None':
|
|
633
698
|
return self.parent.source if self.parent is not None else None
|
|
634
699
|
|
|
635
|
-
def
|
|
700
|
+
def report_error(self, message: str, level: str = 'ERROR'):
|
|
636
701
|
source = self.source or '<unknown>'
|
|
637
702
|
line = f' on line {self.lineno}' if self.lineno else ''
|
|
638
703
|
LOGGER.write(f"Error in file '{source}'{line}: "
|
|
@@ -687,6 +752,50 @@ class ResourceFile(ModelObject):
|
|
|
687
752
|
def keywords(self, keywords: Sequence['UserKeyword']) -> 'UserKeywords':
|
|
688
753
|
return UserKeywords(self, keywords)
|
|
689
754
|
|
|
755
|
+
@classmethod
|
|
756
|
+
def from_file_system(cls, path: 'Path|str', **config) -> 'ResourceFile':
|
|
757
|
+
"""Create a :class:`ResourceFile` object based on the give ``path``.
|
|
758
|
+
|
|
759
|
+
:param path: File path where to read the data from.
|
|
760
|
+
:param config: Configuration parameters for :class:`~.builders.ResourceFileBuilder`
|
|
761
|
+
class that is used internally for building the suite.
|
|
762
|
+
|
|
763
|
+
New in Robot Framework 6.1. See also :meth:`from_string` and :meth:`from_model`.
|
|
764
|
+
"""
|
|
765
|
+
from .builder import ResourceFileBuilder
|
|
766
|
+
return ResourceFileBuilder(**config).build(path)
|
|
767
|
+
|
|
768
|
+
@classmethod
|
|
769
|
+
def from_string(cls, string: str, **config) -> 'ResourceFile':
|
|
770
|
+
"""Create a :class:`ResourceFile` object based on the given ``string``.
|
|
771
|
+
|
|
772
|
+
:param string: String to create the resource file from.
|
|
773
|
+
:param config: Configuration parameters for
|
|
774
|
+
:func:`~robot.parsing.parser.parser.get_resource_model` used internally.
|
|
775
|
+
|
|
776
|
+
New in Robot Framework 6.1. See also :meth:`from_file_system` and
|
|
777
|
+
:meth:`from_model`.
|
|
778
|
+
"""
|
|
779
|
+
from robot.parsing import get_resource_model
|
|
780
|
+
model = get_resource_model(string, data_only=True, **config)
|
|
781
|
+
return cls.from_model(model)
|
|
782
|
+
|
|
783
|
+
@classmethod
|
|
784
|
+
def from_model(cls, model: 'File') -> 'ResourceFile':
|
|
785
|
+
"""Create a :class:`ResourceFile` object based on the given ``model``.
|
|
786
|
+
|
|
787
|
+
:param model: Model to create the suite from.
|
|
788
|
+
|
|
789
|
+
The model can be created by using the
|
|
790
|
+
:func:`~robot.parsing.parser.parser.get_resource_model` function and possibly
|
|
791
|
+
modified by other tooling in the :mod:`robot.parsing` module.
|
|
792
|
+
|
|
793
|
+
New in Robot Framework 6.1. See also :meth:`from_file_system` and
|
|
794
|
+
:meth:`from_string`.
|
|
795
|
+
"""
|
|
796
|
+
from .builder import RobotParser
|
|
797
|
+
return RobotParser().parse_resource_model(model)
|
|
798
|
+
|
|
690
799
|
def to_dict(self) -> DataDict:
|
|
691
800
|
data = {}
|
|
692
801
|
if self._source:
|
|
@@ -706,7 +815,7 @@ class UserKeyword(ModelObject):
|
|
|
706
815
|
repr_args = ('name', 'args')
|
|
707
816
|
fixture_class = Keyword
|
|
708
817
|
__slots__ = ['name', 'args', 'doc', 'return_', 'timeout', 'lineno', 'parent',
|
|
709
|
-
'error', '_teardown']
|
|
818
|
+
'error', '_setup', '_teardown']
|
|
710
819
|
|
|
711
820
|
def __init__(self, name: str = '',
|
|
712
821
|
args: Sequence[str] = (),
|
|
@@ -727,6 +836,7 @@ class UserKeyword(ModelObject):
|
|
|
727
836
|
self.parent = parent
|
|
728
837
|
self.error = error
|
|
729
838
|
self.body = []
|
|
839
|
+
self._setup = None
|
|
730
840
|
self._teardown = None
|
|
731
841
|
|
|
732
842
|
@setter
|
|
@@ -734,24 +844,32 @@ class UserKeyword(ModelObject):
|
|
|
734
844
|
return Body(self, body)
|
|
735
845
|
|
|
736
846
|
@property
|
|
737
|
-
def
|
|
738
|
-
"""
|
|
847
|
+
def setup(self) -> Keyword:
|
|
848
|
+
"""User keyword setup as a :class:`Keyword` object.
|
|
739
849
|
|
|
740
|
-
|
|
850
|
+
New in Robot Framework 7.0.
|
|
741
851
|
"""
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
852
|
+
if self._setup is None:
|
|
853
|
+
self.setup = None
|
|
854
|
+
return self._setup
|
|
855
|
+
|
|
856
|
+
@setup.setter
|
|
857
|
+
def setup(self, setup: 'Keyword|DataDict|None'):
|
|
858
|
+
self._setup = create_fixture(self.fixture_class, setup, self, Keyword.SETUP)
|
|
746
859
|
|
|
747
|
-
@
|
|
748
|
-
def
|
|
749
|
-
|
|
860
|
+
@property
|
|
861
|
+
def has_setup(self) -> bool:
|
|
862
|
+
"""Check does a keyword have a setup without creating a setup object.
|
|
863
|
+
|
|
864
|
+
See :attr:`has_teardown` for more information. New in Robot Framework 7.0.
|
|
865
|
+
"""
|
|
866
|
+
return bool(self._setup)
|
|
750
867
|
|
|
751
868
|
@property
|
|
752
869
|
def teardown(self) -> Keyword:
|
|
870
|
+
"""User keyword teardown as a :class:`Keyword` object."""
|
|
753
871
|
if self._teardown is None:
|
|
754
|
-
self.
|
|
872
|
+
self.teardown = None
|
|
755
873
|
return self._teardown
|
|
756
874
|
|
|
757
875
|
@teardown.setter
|
|
@@ -762,7 +880,7 @@ class UserKeyword(ModelObject):
|
|
|
762
880
|
def has_teardown(self) -> bool:
|
|
763
881
|
"""Check does a keyword have a teardown without creating a teardown object.
|
|
764
882
|
|
|
765
|
-
A difference between using ``if
|
|
883
|
+
A difference between using ``if kw.has_teardown:`` and ``if kw.teardown:``
|
|
766
884
|
is that accessing the :attr:`teardown` attribute creates a :class:`Keyword`
|
|
767
885
|
object representing the teardown even when the user keyword actually does
|
|
768
886
|
not have one. This can have an effect on memory usage.
|
|
@@ -790,6 +908,8 @@ class UserKeyword(ModelObject):
|
|
|
790
908
|
('error', self.error)]:
|
|
791
909
|
if value:
|
|
792
910
|
data[name] = value
|
|
911
|
+
if self.has_setup:
|
|
912
|
+
data['setup'] = self.setup.to_dict()
|
|
793
913
|
data['body'] = self.body.to_dicts()
|
|
794
914
|
if self.has_teardown:
|
|
795
915
|
data['teardown'] = self.teardown.to_dict()
|
|
@@ -802,7 +922,7 @@ class Import(ModelObject):
|
|
|
802
922
|
RESOURCE = 'RESOURCE'
|
|
803
923
|
VARIABLES = 'VARIABLES'
|
|
804
924
|
|
|
805
|
-
def __init__(self, type:
|
|
925
|
+
def __init__(self, type: Literal['LIBRARY', 'RESOURCE', 'VARIABLES'],
|
|
806
926
|
name: str,
|
|
807
927
|
args: Sequence[str] = (),
|
|
808
928
|
alias: 'str|None' = None,
|
|
@@ -836,7 +956,7 @@ class Import(ModelObject):
|
|
|
836
956
|
self.RESOURCE: resource,
|
|
837
957
|
self.VARIABLES: variables}[self.type]
|
|
838
958
|
|
|
839
|
-
def
|
|
959
|
+
def report_error(self, message: str, level: str = 'ERROR'):
|
|
840
960
|
source = self.source or '<unknown>'
|
|
841
961
|
line = f' on line {self.lineno}' if self.lineno else ''
|
|
842
962
|
LOGGER.write(f"Error in file '{source}'{line}: {message}", level)
|