robotframework 6.1.1__zip → 7.0__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework-6.1.1 → robotframework-7.0}/INSTALL.rst +25 -25
- {robotframework-6.1.1 → robotframework-7.0}/PKG-INFO +6 -8
- {robotframework-6.1.1 → robotframework-7.0}/README.rst +3 -2
- {robotframework-6.1.1 → robotframework-7.0}/setup.py +3 -6
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/__init__.py +4 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/deco.py +60 -14
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/exceptions.py +6 -6
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/interfaces.py +402 -67
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/logger.py +27 -20
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/api/parsing.py +4 -2
- robotframework-7.0/src/robot/api/py.typed +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/languages.py +0 -9
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/settings.py +21 -14
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/storage.js +11 -6
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/htmlfilewriter.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.css +10 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.html +10 -0
- robotframework-7.0/src/robot/htmldata/rebot/common.css +362 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/doc_formatting.css +13 -7
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.css +51 -10
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.html +14 -23
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/report.css +83 -19
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/report.html +22 -7
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/view.js +84 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/jsonbuilder.py +38 -20
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/model.py +21 -28
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/robotbuilder.py +50 -31
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/standardtypes.py +9 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/xmlbuilder.py +35 -20
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/xmlwriter.py +18 -38
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/BuiltIn.py +255 -205
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Collections.py +384 -240
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/DateTime.py +73 -60
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/OperatingSystem.py +6 -5
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/String.py +66 -76
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/XML.py +66 -59
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/__init__.py +5 -5
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/body.py +44 -13
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/configurer.py +15 -11
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/control.py +226 -84
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/filter.py +31 -25
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/itemlist.py +9 -8
- robotframework-7.0/src/robot/model/keyword.py +77 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/message.py +19 -10
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/modelobject.py +25 -7
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/stats.py +9 -15
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tags.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/testcase.py +15 -27
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/testsuite.py +17 -26
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/visitor.py +35 -8
- robotframework-7.0/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/verbose.py +61 -61
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/debugfile.py +39 -24
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/filelogger.py +18 -15
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/librarylogger.py +3 -2
- robotframework-7.0/src/robot/output/listeners.py +753 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/logger.py +216 -80
- robotframework-7.0/src/robot/output/loggerapi.py +215 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0/src/robot/output/output.py +185 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/stdoutlogsplitter.py +8 -5
- robotframework-7.0/src/robot/output/xmllogger.py +459 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/statements.py +193 -94
- robotframework-7.0/src/robot/parsing/model/visitor.py +100 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/rebot.py +2 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/logreportwriters.py +16 -10
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/outputwriter.py +18 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/resultwriter.py +4 -4
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/stringcache.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/executionresult.py +56 -8
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/flattenkeywordmatcher.py +48 -9
- robotframework-7.0/src/robot/result/keywordremover.py +207 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/merger.py +1 -1
- robotframework-7.0/src/robot/result/model.py +1185 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/resultbuilder.py +46 -36
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/xmlelementhandlers.py +83 -43
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/run.py +2 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/__init__.py +14 -4
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/__init__.py +2 -1
- robotframework-7.0/src/robot/running/arguments/argumentconverter.py +100 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentmapper.py +26 -24
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentparser.py +82 -60
- robotframework-7.0/src/robot/running/arguments/argumentresolver.py +158 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentspec.py +83 -116
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/argumentvalidator.py +33 -27
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/customconverters.py +15 -12
- robotframework-7.0/src/robot/running/arguments/embedded.py +145 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/arguments/typeconverters.py +233 -213
- robotframework-7.0/src/robot/running/arguments/typeinfo.py +317 -0
- robotframework-7.0/src/robot/running/arguments/typeinfoparser.py +219 -0
- robotframework-7.0/src/robot/running/arguments/typevalidator.py +60 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/bodyrunner.py +147 -129
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/builders.py +2 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/parsers.py +10 -11
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/settings.py +9 -17
- robotframework-7.0/src/robot/running/builder/transformers.py +535 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/context.py +113 -31
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/dynamicmethods.py +62 -34
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/importer.py +27 -49
- robotframework-7.0/src/robot/running/invalidkeyword.py +67 -0
- robotframework-7.0/src/robot/running/keywordfinder.py +91 -0
- robotframework-7.0/src/robot/running/keywordimplementation.py +164 -0
- robotframework-7.0/src/robot/running/librarykeyword.py +392 -0
- robotframework-7.0/src/robot/running/librarykeywordrunner.py +250 -0
- robotframework-7.0/src/robot/running/libraryscopes.py +115 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/model.py +195 -377
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/namespace.py +124 -137
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/outputcapture.py +20 -12
- robotframework-7.0/src/robot/running/resourcemodel.py +448 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/statusreporter.py +16 -13
- robotframework-7.0/src/robot/running/suiterunner.py +265 -0
- robotframework-7.0/src/robot/running/testlibraries.py +500 -0
- robotframework-7.0/src/robot/running/userkeywordrunner.py +260 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/testdoc.py +18 -13
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/__init__.py +53 -35
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/dotdict.py +3 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/encodingsniffer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/escaping.py +19 -19
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/importer.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/markupwriters.py +23 -15
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/misc.py +1 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0/src/robot/utils/notset.py +33 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotio.py +9 -9
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robottime.py +122 -90
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robottypes.py +21 -31
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/text.py +7 -4
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/scopes.py +17 -12
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/search.py +66 -41
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/store.py +14 -16
- robotframework-7.0/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/version.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/PKG-INFO +6 -8
- {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/SOURCES.txt +10 -8
- {robotframework-6.1.1 → robotframework-7.0}/tasks.py +6 -6
- robotframework-6.1.1/src/robot/htmldata/rebot/common.css +0 -239
- 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/output/xmllogger.py +0 -354
- robotframework-6.1.1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1.1/src/robot/result/keywordremover.py +0 -183
- robotframework-6.1.1/src/robot/result/model.py +0 -957
- robotframework-6.1.1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1.1/src/robot/running/arguments/argumentresolver.py +0 -131
- robotframework-6.1.1/src/robot/running/arguments/embedded.py +0 -146
- robotframework-6.1.1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1.1/src/robot/running/builder/transformers.py +0 -642
- robotframework-6.1.1/src/robot/running/handlers.py +0 -321
- robotframework-6.1.1/src/robot/running/handlerstore.py +0 -66
- robotframework-6.1.1/src/robot/running/librarykeywordrunner.py +0 -238
- robotframework-6.1.1/src/robot/running/libraryscopes.py +0 -97
- robotframework-6.1.1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1.1/src/robot/running/suiterunner.py +0 -248
- robotframework-6.1.1/src/robot/running/testlibraries.py +0 -423
- robotframework-6.1.1/src/robot/running/usererrorhandler.py +0 -75
- robotframework-6.1.1/src/robot/running/userkeyword.py +0 -111
- robotframework-6.1.1/src/robot/running/userkeywordrunner.py +0 -274
- robotframework-6.1.1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1.1 → robotframework-7.0}/AUTHORS.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/BUILD.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/COPYRIGHT.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/LICENSE.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/MANIFEST.in +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/setup.cfg +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/__main__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/errors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdoc.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/libraries/dialogs_py.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/modifier.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/status.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/application.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/error.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/match.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -29,8 +29,9 @@ from .statementlexers import (BreakLexer, CommentLexer, CommentSectionHeaderLexe
|
|
|
29
29
|
KeywordSettingLexer, Lexer, ReturnLexer, SettingLexer,
|
|
30
30
|
SettingSectionHeaderLexer, SyntaxErrorLexer,
|
|
31
31
|
TaskSectionHeaderLexer, TestCaseSectionHeaderLexer,
|
|
32
|
-
TestCaseSettingLexer, TryHeaderLexer,
|
|
33
|
-
VariableSectionHeaderLexer,
|
|
32
|
+
TestCaseSettingLexer, TryHeaderLexer, VarLexer,
|
|
33
|
+
VariableLexer, VariableSectionHeaderLexer,
|
|
34
|
+
WhileHeaderLexer)
|
|
34
35
|
from .tokens import StatementTokens, Token
|
|
35
36
|
|
|
36
37
|
|
|
@@ -200,8 +201,8 @@ class TestCaseLexer(TestOrKeywordLexer):
|
|
|
200
201
|
self._lex_with_priority(priority=TestCaseSettingLexer)
|
|
201
202
|
|
|
202
203
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
203
|
-
return (TestCaseSettingLexer, ForLexer, InlineIfLexer, IfLexer,
|
|
204
|
-
|
|
204
|
+
return (TestCaseSettingLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer,
|
|
205
|
+
WhileLexer, VarLexer, SyntaxErrorLexer, KeywordCallLexer)
|
|
205
206
|
|
|
206
207
|
|
|
207
208
|
class KeywordLexer(TestOrKeywordLexer):
|
|
@@ -211,8 +212,8 @@ class KeywordLexer(TestOrKeywordLexer):
|
|
|
211
212
|
super().__init__(ctx.keyword_context())
|
|
212
213
|
|
|
213
214
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
214
|
-
return (KeywordSettingLexer, ForLexer, InlineIfLexer, IfLexer,
|
|
215
|
-
|
|
215
|
+
return (KeywordSettingLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer,
|
|
216
|
+
WhileLexer, VarLexer, ReturnLexer, SyntaxErrorLexer, KeywordCallLexer)
|
|
216
217
|
|
|
217
218
|
|
|
218
219
|
class NestedBlockLexer(BlockLexer, ABC):
|
|
@@ -242,7 +243,8 @@ class ForLexer(NestedBlockLexer):
|
|
|
242
243
|
|
|
243
244
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
244
245
|
return (ForHeaderLexer, InlineIfLexer, IfLexer, TryLexer, WhileLexer, EndLexer,
|
|
245
|
-
ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
|
|
246
|
+
VarLexer, ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
|
|
247
|
+
KeywordCallLexer)
|
|
246
248
|
|
|
247
249
|
|
|
248
250
|
class WhileLexer(NestedBlockLexer):
|
|
@@ -252,7 +254,8 @@ class WhileLexer(NestedBlockLexer):
|
|
|
252
254
|
|
|
253
255
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
254
256
|
return (WhileHeaderLexer, ForLexer, InlineIfLexer, IfLexer, TryLexer, EndLexer,
|
|
255
|
-
ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
|
|
257
|
+
VarLexer, ReturnLexer, ContinueLexer, BreakLexer, SyntaxErrorLexer,
|
|
258
|
+
KeywordCallLexer)
|
|
256
259
|
|
|
257
260
|
|
|
258
261
|
class TryLexer(NestedBlockLexer):
|
|
@@ -262,8 +265,9 @@ class TryLexer(NestedBlockLexer):
|
|
|
262
265
|
|
|
263
266
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
264
267
|
return (TryHeaderLexer, ExceptHeaderLexer, ElseHeaderLexer, FinallyHeaderLexer,
|
|
265
|
-
ForLexer, InlineIfLexer, IfLexer, WhileLexer, EndLexer,
|
|
266
|
-
BreakLexer, ContinueLexer, SyntaxErrorLexer,
|
|
268
|
+
ForLexer, InlineIfLexer, IfLexer, WhileLexer, EndLexer, VarLexer,
|
|
269
|
+
ReturnLexer, BreakLexer, ContinueLexer, SyntaxErrorLexer,
|
|
270
|
+
KeywordCallLexer)
|
|
267
271
|
|
|
268
272
|
|
|
269
273
|
class IfLexer(NestedBlockLexer):
|
|
@@ -273,8 +277,8 @@ class IfLexer(NestedBlockLexer):
|
|
|
273
277
|
|
|
274
278
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
275
279
|
return (InlineIfLexer, IfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer,
|
|
276
|
-
ForLexer, TryLexer, WhileLexer, EndLexer,
|
|
277
|
-
BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
|
|
280
|
+
ForLexer, TryLexer, WhileLexer, EndLexer, VarLexer, ReturnLexer,
|
|
281
|
+
ContinueLexer, BreakLexer, SyntaxErrorLexer, KeywordCallLexer)
|
|
278
282
|
|
|
279
283
|
|
|
280
284
|
class InlineIfLexer(NestedBlockLexer):
|
|
@@ -288,7 +292,7 @@ class InlineIfLexer(NestedBlockLexer):
|
|
|
288
292
|
return False
|
|
289
293
|
|
|
290
294
|
def lexer_classes(self) -> 'tuple[type[Lexer], ...]':
|
|
291
|
-
return (InlineIfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer,
|
|
295
|
+
return (InlineIfHeaderLexer, ElseIfHeaderLexer, ElseHeaderLexer, VarLexer,
|
|
292
296
|
ReturnLexer, ContinueLexer, BreakLexer, KeywordCallLexer)
|
|
293
297
|
|
|
294
298
|
def input(self, statement: StatementTokens):
|
|
@@ -76,8 +76,18 @@ class FileContext(LexingContext):
|
|
|
76
76
|
|
|
77
77
|
def _handles_section(self, statement: StatementTokens, header: str) -> bool:
|
|
78
78
|
marker = statement[0].value
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
if not marker or marker[0] != '*':
|
|
80
|
+
return False
|
|
81
|
+
normalized = self._normalize(marker)
|
|
82
|
+
if self.languages.headers.get(normalized) == header:
|
|
83
|
+
return True
|
|
84
|
+
if normalized == header[:-1]:
|
|
85
|
+
statement[0].error = (
|
|
86
|
+
f"Singular section headers like '{marker}' are deprecated. "
|
|
87
|
+
f"Use plural format like '*** {header} ***' instead."
|
|
88
|
+
)
|
|
89
|
+
return True
|
|
90
|
+
return False
|
|
81
91
|
|
|
82
92
|
def _normalize(self, marker: str) -> str:
|
|
83
93
|
return normalize_whitespace(marker).strip('* ').title()
|
|
@@ -128,7 +128,7 @@ class Lexer:
|
|
|
128
128
|
|
|
129
129
|
def _get_tokens(self, statements: 'Iterable[list[Token]]') -> 'Iterator[Token]':
|
|
130
130
|
if self.data_only:
|
|
131
|
-
ignored_types = {None, Token.
|
|
131
|
+
ignored_types = {None, Token.COMMENT}
|
|
132
132
|
else:
|
|
133
133
|
ignored_types = {None}
|
|
134
134
|
inline_if_type = Token.INLINE_IF
|
|
@@ -112,8 +112,7 @@ class Settings(ABC):
|
|
|
112
112
|
token.type = Token.COMMENT
|
|
113
113
|
|
|
114
114
|
def _lex_setting(self, statement: StatementTokens, name: str):
|
|
115
|
-
|
|
116
|
-
statement[0].type = {'Test Tags': Token.FORCE_TAGS,
|
|
115
|
+
statement[0].type = {'Test Tags': Token.TEST_TAGS,
|
|
117
116
|
'Name': Token.SUITE_NAME}.get(name, name.upper())
|
|
118
117
|
self.settings[name] = values = statement[1:]
|
|
119
118
|
if name in self.name_and_arguments:
|
|
@@ -122,6 +121,9 @@ class Settings(ABC):
|
|
|
122
121
|
self._lex_name_arguments_and_with_name(values)
|
|
123
122
|
else:
|
|
124
123
|
self._lex_arguments(values)
|
|
124
|
+
if name == 'Return':
|
|
125
|
+
statement[0].error = ("The '[Return]' setting is deprecated. "
|
|
126
|
+
"Use the 'RETURN' statement instead.")
|
|
125
127
|
|
|
126
128
|
def _lex_name_and_arguments(self, tokens: StatementTokens):
|
|
127
129
|
if tokens:
|
|
@@ -132,7 +134,7 @@ class Settings(ABC):
|
|
|
132
134
|
self._lex_name_and_arguments(tokens)
|
|
133
135
|
if len(tokens) > 1 and \
|
|
134
136
|
normalize_whitespace(tokens[-2].value) in ('WITH NAME', 'AS'):
|
|
135
|
-
tokens[-2].type = Token.
|
|
137
|
+
tokens[-2].type = Token.AS
|
|
136
138
|
tokens[-1].type = Token.NAME
|
|
137
139
|
|
|
138
140
|
def _lex_arguments(self, tokens: StatementTokens):
|
|
@@ -257,6 +259,7 @@ class KeywordSettings(Settings):
|
|
|
257
259
|
names = (
|
|
258
260
|
'Documentation',
|
|
259
261
|
'Arguments',
|
|
262
|
+
'Setup',
|
|
260
263
|
'Teardown',
|
|
261
264
|
'Timeout',
|
|
262
265
|
'Tags',
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
from abc import ABC, abstractmethod
|
|
17
|
-
from typing import List
|
|
18
17
|
|
|
19
18
|
from robot.errors import DataError
|
|
20
19
|
from robot.utils import normalize_whitespace
|
|
@@ -58,14 +57,20 @@ class StatementLexer(Lexer, ABC):
|
|
|
58
57
|
def input(self, statement: StatementTokens):
|
|
59
58
|
self.statement = statement
|
|
60
59
|
|
|
60
|
+
@abstractmethod
|
|
61
61
|
def lex(self):
|
|
62
62
|
raise NotImplementedError
|
|
63
63
|
|
|
64
64
|
def _lex_options(self, *names: str, end_index: 'int|None' = None):
|
|
65
|
+
seen = set()
|
|
65
66
|
for token in reversed(self.statement[:end_index]):
|
|
66
|
-
if
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if '=' in token.value:
|
|
68
|
+
name = token.value.split('=')[0]
|
|
69
|
+
if name in names and name not in seen:
|
|
70
|
+
token.type = Token.OPTION
|
|
71
|
+
seen.add(name)
|
|
72
|
+
continue
|
|
73
|
+
break
|
|
69
74
|
|
|
70
75
|
|
|
71
76
|
class SingleType(StatementLexer, ABC):
|
|
@@ -181,6 +186,11 @@ class VariableLexer(TypeAndArguments):
|
|
|
181
186
|
ctx: FileContext
|
|
182
187
|
token_type = Token.VARIABLE
|
|
183
188
|
|
|
189
|
+
def lex(self):
|
|
190
|
+
super().lex()
|
|
191
|
+
if self.statement[0].value[:1] == '$':
|
|
192
|
+
self._lex_options('separator')
|
|
193
|
+
|
|
184
194
|
|
|
185
195
|
class KeywordCallLexer(StatementLexer):
|
|
186
196
|
ctx: 'TestCaseContext|KeywordContext'
|
|
@@ -200,7 +210,8 @@ class KeywordCallLexer(StatementLexer):
|
|
|
200
210
|
for token in self.statement:
|
|
201
211
|
if keyword_seen:
|
|
202
212
|
token.type = Token.ARGUMENT
|
|
203
|
-
elif is_assign(token.value, allow_assign_mark=True,
|
|
213
|
+
elif is_assign(token.value, allow_assign_mark=True, allow_nested=True,
|
|
214
|
+
allow_items=True):
|
|
204
215
|
token.type = Token.ASSIGN
|
|
205
216
|
else:
|
|
206
217
|
token.type = Token.KEYWORD
|
|
@@ -225,9 +236,9 @@ class ForHeaderLexer(StatementLexer):
|
|
|
225
236
|
else:
|
|
226
237
|
token.type = Token.VARIABLE
|
|
227
238
|
if separator == 'IN ENUMERATE':
|
|
228
|
-
self._lex_options('start
|
|
239
|
+
self._lex_options('start')
|
|
229
240
|
elif separator == 'IN ZIP':
|
|
230
|
-
self._lex_options('mode
|
|
241
|
+
self._lex_options('mode', 'fill')
|
|
231
242
|
|
|
232
243
|
|
|
233
244
|
class IfHeaderLexer(TypeAndArguments):
|
|
@@ -244,7 +255,8 @@ class InlineIfHeaderLexer(StatementLexer):
|
|
|
244
255
|
for token in statement:
|
|
245
256
|
if token.value == 'IF':
|
|
246
257
|
return True
|
|
247
|
-
if not is_assign(token.value, allow_assign_mark=True,
|
|
258
|
+
if not is_assign(token.value, allow_assign_mark=True, allow_nested=True,
|
|
259
|
+
allow_items=True):
|
|
248
260
|
return False
|
|
249
261
|
return False
|
|
250
262
|
|
|
@@ -298,7 +310,7 @@ class ExceptHeaderLexer(StatementLexer):
|
|
|
298
310
|
token.type = Token.VARIABLE
|
|
299
311
|
else:
|
|
300
312
|
token.type = Token.ARGUMENT
|
|
301
|
-
self._lex_options('type
|
|
313
|
+
self._lex_options('type', end_index=as_index)
|
|
302
314
|
|
|
303
315
|
|
|
304
316
|
class FinallyHeaderLexer(TypeAndArguments):
|
|
@@ -318,7 +330,7 @@ class WhileHeaderLexer(StatementLexer):
|
|
|
318
330
|
self.statement[0].type = Token.WHILE
|
|
319
331
|
for token in self.statement[1:]:
|
|
320
332
|
token.type = Token.ARGUMENT
|
|
321
|
-
self._lex_options('limit
|
|
333
|
+
self._lex_options('limit', 'on_limit', 'on_limit_message')
|
|
322
334
|
|
|
323
335
|
|
|
324
336
|
class EndLexer(TypeAndArguments):
|
|
@@ -328,6 +340,23 @@ class EndLexer(TypeAndArguments):
|
|
|
328
340
|
return statement[0].value == 'END'
|
|
329
341
|
|
|
330
342
|
|
|
343
|
+
class VarLexer(StatementLexer):
|
|
344
|
+
token_type = Token.VAR
|
|
345
|
+
|
|
346
|
+
def handles(self, statement: StatementTokens) -> bool:
|
|
347
|
+
return statement[0].value == 'VAR'
|
|
348
|
+
|
|
349
|
+
def lex(self):
|
|
350
|
+
self.statement[0].type = Token.VAR
|
|
351
|
+
if len(self.statement) > 1:
|
|
352
|
+
name, *values = self.statement[1:]
|
|
353
|
+
name.type = Token.VARIABLE
|
|
354
|
+
for value in values:
|
|
355
|
+
value.type = Token.ARGUMENT
|
|
356
|
+
options = ['scope', 'separator'] if name.value[:1] == '$' else ['scope']
|
|
357
|
+
self._lex_options(*options)
|
|
358
|
+
|
|
359
|
+
|
|
331
360
|
class ReturnLexer(TypeAndArguments):
|
|
332
361
|
token_type = Token.RETURN_STATEMENT
|
|
333
362
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
from collections.abc import Iterator
|
|
17
17
|
from typing import cast, List
|
|
18
18
|
|
|
19
|
-
from robot.variables import
|
|
19
|
+
from robot.variables import VariableMatches
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
# Type alias to ease typing elsewhere
|
|
@@ -49,7 +49,7 @@ class Token:
|
|
|
49
49
|
KEYWORD_HEADER = 'KEYWORD HEADER'
|
|
50
50
|
COMMENT_HEADER = 'COMMENT HEADER'
|
|
51
51
|
INVALID_HEADER = 'INVALID HEADER'
|
|
52
|
-
FATAL_INVALID_HEADER = 'FATAL INVALID HEADER'
|
|
52
|
+
FATAL_INVALID_HEADER = 'FATAL INVALID HEADER' # TODO: Remove in RF 8.
|
|
53
53
|
|
|
54
54
|
TESTCASE_NAME = 'TESTCASE NAME'
|
|
55
55
|
KEYWORD_NAME = 'KEYWORD NAME'
|
|
@@ -62,7 +62,8 @@ class Token:
|
|
|
62
62
|
TEST_TEARDOWN = 'TEST TEARDOWN'
|
|
63
63
|
TEST_TEMPLATE = 'TEST TEMPLATE'
|
|
64
64
|
TEST_TIMEOUT = 'TEST TIMEOUT'
|
|
65
|
-
|
|
65
|
+
TEST_TAGS = 'TEST TAGS'
|
|
66
|
+
FORCE_TAGS = TEST_TAGS # TODO: Remove in RF 8.
|
|
66
67
|
DEFAULT_TAGS = 'DEFAULT TAGS'
|
|
67
68
|
KEYWORD_TAGS = 'KEYWORD TAGS'
|
|
68
69
|
LIBRARY = 'LIBRARY'
|
|
@@ -74,14 +75,11 @@ class Token:
|
|
|
74
75
|
TIMEOUT = 'TIMEOUT'
|
|
75
76
|
TAGS = 'TAGS'
|
|
76
77
|
ARGUMENTS = 'ARGUMENTS'
|
|
77
|
-
#
|
|
78
|
-
|
|
79
|
-
RETURN = 'RETURN'
|
|
80
|
-
RETURN_SETTING = RETURN
|
|
78
|
+
RETURN = 'RETURN' # TODO: Change to mean RETURN statement in RF 8.
|
|
79
|
+
RETURN_SETTING = RETURN # TODO: Remove in RF 8.
|
|
81
80
|
|
|
82
|
-
# TODO: Change WITH_NAME value to AS in RF 7.0. Remove WITH_NAME in RF 8.
|
|
83
|
-
WITH_NAME = 'WITH NAME'
|
|
84
81
|
AS = 'AS'
|
|
82
|
+
WITH_NAME = AS # TODO: Remove in RF 8.
|
|
85
83
|
|
|
86
84
|
NAME = 'NAME'
|
|
87
85
|
VARIABLE = 'VARIABLE'
|
|
@@ -99,6 +97,7 @@ class Token:
|
|
|
99
97
|
EXCEPT = 'EXCEPT'
|
|
100
98
|
FINALLY = 'FINALLY'
|
|
101
99
|
WHILE = 'WHILE'
|
|
100
|
+
VAR = 'VAR'
|
|
102
101
|
RETURN_STATEMENT = 'RETURN STATEMENT'
|
|
103
102
|
CONTINUE = 'CONTINUE'
|
|
104
103
|
BREAK = 'BREAK'
|
|
@@ -110,10 +109,8 @@ class Token:
|
|
|
110
109
|
CONFIG = 'CONFIG'
|
|
111
110
|
EOL = 'EOL'
|
|
112
111
|
EOS = 'EOS'
|
|
113
|
-
|
|
114
112
|
ERROR = 'ERROR'
|
|
115
|
-
|
|
116
|
-
FATAL_ERROR = 'FATAL ERROR'
|
|
113
|
+
FATAL_ERROR = 'FATAL ERROR' # TODO: Remove in RF 8.
|
|
117
114
|
|
|
118
115
|
NON_DATA_TOKENS = frozenset((
|
|
119
116
|
SEPARATOR,
|
|
@@ -132,7 +129,7 @@ class Token:
|
|
|
132
129
|
TEST_TEARDOWN,
|
|
133
130
|
TEST_TEMPLATE,
|
|
134
131
|
TEST_TIMEOUT,
|
|
135
|
-
|
|
132
|
+
TEST_TAGS,
|
|
136
133
|
DEFAULT_TAGS,
|
|
137
134
|
KEYWORD_TAGS,
|
|
138
135
|
LIBRARY,
|
|
@@ -172,9 +169,10 @@ class Token:
|
|
|
172
169
|
Token.IF: 'IF', Token.INLINE_IF: 'IF', Token.ELSE_IF: 'ELSE IF',
|
|
173
170
|
Token.ELSE: 'ELSE', Token.FOR: 'FOR', Token.WHILE: 'WHILE',
|
|
174
171
|
Token.TRY: 'TRY', Token.EXCEPT: 'EXCEPT', Token.FINALLY: 'FINALLY',
|
|
175
|
-
Token.END: 'END', Token.
|
|
176
|
-
Token.
|
|
177
|
-
Token.
|
|
172
|
+
Token.END: 'END', Token.VAR: 'VAR', Token.CONTINUE: 'CONTINUE',
|
|
173
|
+
Token.BREAK: 'BREAK', Token.RETURN_STATEMENT: 'RETURN',
|
|
174
|
+
Token.CONTINUATION: '...', Token.EOL: '\n', Token.WITH_NAME: 'AS',
|
|
175
|
+
Token.AS: 'AS'
|
|
178
176
|
}.get(type, '') # type: ignore
|
|
179
177
|
self.value = cast(str, value)
|
|
180
178
|
self.lineno = lineno
|
|
@@ -205,26 +203,26 @@ class Token:
|
|
|
205
203
|
"""
|
|
206
204
|
if self.type not in Token.ALLOW_VARIABLES:
|
|
207
205
|
return self._tokenize_no_variables()
|
|
208
|
-
|
|
209
|
-
if not
|
|
206
|
+
matches = VariableMatches(self.value)
|
|
207
|
+
if not matches:
|
|
210
208
|
return self._tokenize_no_variables()
|
|
211
|
-
return self._tokenize_variables(
|
|
209
|
+
return self._tokenize_variables(matches)
|
|
212
210
|
|
|
213
211
|
def _tokenize_no_variables(self) -> 'Iterator[Token]':
|
|
214
212
|
yield self
|
|
215
213
|
|
|
216
|
-
def _tokenize_variables(self,
|
|
214
|
+
def _tokenize_variables(self, matches) -> 'Iterator[Token]':
|
|
217
215
|
lineno = self.lineno
|
|
218
216
|
col_offset = self.col_offset
|
|
219
|
-
|
|
220
|
-
for
|
|
221
|
-
if before:
|
|
222
|
-
yield Token(self.type, before, lineno, col_offset)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if
|
|
227
|
-
yield Token(self.type,
|
|
217
|
+
after = ''
|
|
218
|
+
for match in matches:
|
|
219
|
+
if match.before:
|
|
220
|
+
yield Token(self.type, match.before, lineno, col_offset)
|
|
221
|
+
yield Token(Token.VARIABLE, match.match, lineno, col_offset + match.start)
|
|
222
|
+
col_offset += match.end
|
|
223
|
+
after = match.after
|
|
224
|
+
if after:
|
|
225
|
+
yield Token(self.type, after, lineno, col_offset)
|
|
228
226
|
|
|
229
227
|
def __str__(self) -> str:
|
|
230
228
|
return self.value
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
+
import warnings
|
|
16
17
|
from abc import ABC
|
|
17
18
|
from contextlib import contextmanager
|
|
18
19
|
from pathlib import Path
|
|
@@ -24,7 +25,7 @@ from .statements import (Break, Continue, ElseHeader, ElseIfHeader, End, ExceptH
|
|
|
24
25
|
Error, FinallyHeader, ForHeader, IfHeader, KeywordCall,
|
|
25
26
|
KeywordName, Node, ReturnSetting, ReturnStatement,
|
|
26
27
|
SectionHeader, Statement, TemplateArguments, TestCaseName,
|
|
27
|
-
TryHeader, WhileHeader)
|
|
28
|
+
TryHeader, Var, WhileHeader)
|
|
28
29
|
from .visitor import ModelVisitor
|
|
29
30
|
from ..lexer import Token
|
|
30
31
|
|
|
@@ -97,7 +98,7 @@ class Block(Container, ABC):
|
|
|
97
98
|
|
|
98
99
|
def _body_is_empty(self):
|
|
99
100
|
# This works with tests, keywords, and blocks inside them, not with sections.
|
|
100
|
-
valid = (KeywordCall, TemplateArguments, Continue, Break, ReturnSetting,
|
|
101
|
+
valid = (KeywordCall, TemplateArguments, Var, Continue, Break, ReturnSetting,
|
|
101
102
|
ReturnStatement, NestedBlock, Error)
|
|
102
103
|
return not any(isinstance(node, valid) for node in self.body)
|
|
103
104
|
|
|
@@ -255,8 +256,14 @@ class For(NestedBlock):
|
|
|
255
256
|
header: ForHeader
|
|
256
257
|
|
|
257
258
|
@property
|
|
258
|
-
def
|
|
259
|
-
return self.header.
|
|
259
|
+
def assign(self) -> 'tuple[str, ...]':
|
|
260
|
+
return self.header.assign
|
|
261
|
+
|
|
262
|
+
@property
|
|
263
|
+
def variables(self) -> 'tuple[str, ...]': # TODO: Remove in RF 8.0.
|
|
264
|
+
warnings.warn("'For.variables' is deprecated and will be removed in "
|
|
265
|
+
"Robot Framework 8.0. Use 'For.assign' instead.")
|
|
266
|
+
return self.assign
|
|
260
267
|
|
|
261
268
|
@property
|
|
262
269
|
def values(self) -> 'tuple[str, ...]':
|
|
@@ -307,8 +314,14 @@ class Try(NestedBlock):
|
|
|
307
314
|
return getattr(self.header, 'pattern_type', None)
|
|
308
315
|
|
|
309
316
|
@property
|
|
310
|
-
def
|
|
311
|
-
return getattr(self.header, '
|
|
317
|
+
def assign(self) -> 'str|None':
|
|
318
|
+
return getattr(self.header, 'assign', None)
|
|
319
|
+
|
|
320
|
+
@property
|
|
321
|
+
def variable(self) -> 'str|None': # TODO: Remove in RF 8.0.
|
|
322
|
+
warnings.warn("'Try.variable' is deprecated and will be removed in "
|
|
323
|
+
"Robot Framework 8.0. Use 'Try.assign' instead.")
|
|
324
|
+
return self.assign
|
|
312
325
|
|
|
313
326
|
def validate(self, ctx: 'ValidationContext'):
|
|
314
327
|
self._validate_body()
|