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
|
@@ -13,49 +13,90 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
from
|
|
18
|
-
|
|
19
|
-
from typing import Literal
|
|
16
|
+
import warnings
|
|
17
|
+
from collections import OrderedDict
|
|
18
|
+
from typing import Any, cast, Mapping, Literal, Sequence, TypeVar, TYPE_CHECKING
|
|
20
19
|
|
|
21
20
|
from robot.utils import setter
|
|
22
21
|
|
|
23
|
-
from .body import Body, BodyItem, BodyItemParent, BaseBranches
|
|
24
|
-
from .keyword import Keywords
|
|
22
|
+
from .body import Body, BodyItem, BodyItemParent, BaseBranches, BaseIterations
|
|
25
23
|
from .modelobject import DataDict
|
|
26
24
|
from .visitor import SuiteVisitor
|
|
27
25
|
|
|
28
26
|
if TYPE_CHECKING:
|
|
29
27
|
from robot.model import Keyword, Message
|
|
30
28
|
|
|
29
|
+
|
|
31
30
|
IT = TypeVar('IT', bound='IfBranch|TryBranch')
|
|
31
|
+
FW = TypeVar('FW', bound='ForIteration|WhileIteration')
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class Branches(BaseBranches['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
|
|
35
|
+
'Continue', 'Break', 'Message', 'Error', IT]):
|
|
36
|
+
__slots__ = ()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class Iterations(BaseIterations['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
|
|
40
|
+
'Continue', 'Break', 'Message', 'Error', FW]):
|
|
41
|
+
__slots__ = ()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ForIteration(BodyItem):
|
|
45
|
+
"""Represents one FOR loop iteration."""
|
|
46
|
+
type = BodyItem.ITERATION
|
|
47
|
+
body_class = Body
|
|
48
|
+
repr_args = ('assign',)
|
|
49
|
+
__slots__ = ['assign', 'message', 'status', '_start_time', '_end_time',
|
|
50
|
+
'_elapsed_time']
|
|
51
|
+
|
|
52
|
+
def __init__(self, assign: 'Mapping[str, str]|None' = None,
|
|
53
|
+
parent: BodyItemParent = None):
|
|
54
|
+
self.assign = OrderedDict(assign or ())
|
|
55
|
+
self.parent = parent
|
|
56
|
+
self.body = ()
|
|
32
57
|
|
|
58
|
+
@property
|
|
59
|
+
def variables(self) -> 'Mapping[str, str]': # TODO: Remove in RF 8.0.
|
|
60
|
+
"""Deprecated since Robot Framework 7.0. Use :attr:`assign` instead."""
|
|
61
|
+
warnings.warn("'ForIteration.variables' is deprecated and will be removed in "
|
|
62
|
+
"Robot Framework 8.0. Use 'ForIteration.assign' instead.")
|
|
63
|
+
return self.assign
|
|
64
|
+
|
|
65
|
+
@setter
|
|
66
|
+
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
67
|
+
return self.body_class(self, body)
|
|
33
68
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
69
|
+
def visit(self, visitor: SuiteVisitor):
|
|
70
|
+
visitor.visit_for_iteration(self)
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def _log_name(self):
|
|
74
|
+
return ', '.join(f'{name} = {value}' for name, value in self.assign.items())
|
|
75
|
+
|
|
76
|
+
def to_dict(self) -> DataDict:
|
|
77
|
+
return {
|
|
78
|
+
'type': self.type,
|
|
79
|
+
'assign': dict(self.assign),
|
|
80
|
+
'body': self.body.to_dicts()
|
|
81
|
+
}
|
|
37
82
|
|
|
38
83
|
|
|
39
84
|
@Body.register
|
|
40
85
|
class For(BodyItem):
|
|
41
|
-
"""Represents ``FOR`` loops.
|
|
42
|
-
|
|
43
|
-
:attr:`flavor` specifies the flavor, and it can be ``IN``, ``IN RANGE``,
|
|
44
|
-
``IN ENUMERATE`` or ``IN ZIP``.
|
|
45
|
-
"""
|
|
86
|
+
"""Represents ``FOR`` loops."""
|
|
46
87
|
type = BodyItem.FOR
|
|
47
88
|
body_class = Body
|
|
48
|
-
repr_args = ('
|
|
49
|
-
__slots__ = ['
|
|
89
|
+
repr_args = ('assign', 'flavor', 'values', 'start', 'mode', 'fill')
|
|
90
|
+
__slots__ = ['assign', 'flavor', 'values', 'start', 'mode', 'fill']
|
|
50
91
|
|
|
51
|
-
def __init__(self,
|
|
52
|
-
flavor:
|
|
92
|
+
def __init__(self, assign: Sequence[str] = (),
|
|
93
|
+
flavor: Literal['IN', 'IN RANGE', 'IN ENUMERATE', 'IN ZIP'] = 'IN',
|
|
53
94
|
values: Sequence[str] = (),
|
|
54
95
|
start: 'str|None' = None,
|
|
55
96
|
mode: 'str|None' = None,
|
|
56
97
|
fill: 'str|None' = None,
|
|
57
98
|
parent: BodyItemParent = None):
|
|
58
|
-
self.
|
|
99
|
+
self.assign = tuple(assign)
|
|
59
100
|
self.flavor = flavor
|
|
60
101
|
self.values = tuple(values)
|
|
61
102
|
self.start = start
|
|
@@ -64,37 +105,29 @@ class For(BodyItem):
|
|
|
64
105
|
self.parent = parent
|
|
65
106
|
self.body = ()
|
|
66
107
|
|
|
108
|
+
@property
|
|
109
|
+
def variables(self) -> 'tuple[str, ...]': # TODO: Remove in RF 8.0.
|
|
110
|
+
"""Deprecated since Robot Framework 7.0. Use :attr:`assign` instead."""
|
|
111
|
+
warnings.warn("'For.variables' is deprecated and will be removed in "
|
|
112
|
+
"Robot Framework 8.0. Use 'For.assign' instead.")
|
|
113
|
+
return self.assign
|
|
114
|
+
|
|
115
|
+
@variables.setter
|
|
116
|
+
def variables(self, assign: 'tuple[str, ...]'):
|
|
117
|
+
warnings.warn("'For.variables' is deprecated and will be removed in "
|
|
118
|
+
"Robot Framework 8.0. Use 'For.assign' instead.")
|
|
119
|
+
self.assign = assign
|
|
120
|
+
|
|
67
121
|
@setter
|
|
68
122
|
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
69
123
|
return self.body_class(self, body)
|
|
70
124
|
|
|
71
|
-
@property
|
|
72
|
-
def keywords(self):
|
|
73
|
-
"""Deprecated since Robot Framework 4.0. Use :attr:`body` instead."""
|
|
74
|
-
return Keywords(self, self.body)
|
|
75
|
-
|
|
76
|
-
@keywords.setter
|
|
77
|
-
def keywords(self, keywords):
|
|
78
|
-
Keywords.raise_deprecation_error()
|
|
79
|
-
|
|
80
125
|
def visit(self, visitor: SuiteVisitor):
|
|
81
126
|
visitor.visit_for(self)
|
|
82
127
|
|
|
83
|
-
def __str__(self):
|
|
84
|
-
parts = ['FOR', *self.variables, self.flavor, *self.values]
|
|
85
|
-
for name, value in [('start', self.start),
|
|
86
|
-
('mode', self.mode),
|
|
87
|
-
('fill', self.fill)]:
|
|
88
|
-
if value is not None:
|
|
89
|
-
parts.append(f'{name}={value}')
|
|
90
|
-
return ' '.join(parts)
|
|
91
|
-
|
|
92
|
-
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
93
|
-
return name not in ('start', 'mode', 'fill') or value is not None
|
|
94
|
-
|
|
95
128
|
def to_dict(self) -> DataDict:
|
|
96
129
|
data = {'type': self.type,
|
|
97
|
-
'
|
|
130
|
+
'assign': self.assign,
|
|
98
131
|
'flavor': self.flavor,
|
|
99
132
|
'values': self.values}
|
|
100
133
|
for name, value in [('start', self.start),
|
|
@@ -105,6 +138,42 @@ class For(BodyItem):
|
|
|
105
138
|
data['body'] = self.body.to_dicts()
|
|
106
139
|
return data
|
|
107
140
|
|
|
141
|
+
def __str__(self):
|
|
142
|
+
parts = ['FOR', *self.assign, self.flavor, *self.values]
|
|
143
|
+
for name, value in [('start', self.start),
|
|
144
|
+
('mode', self.mode),
|
|
145
|
+
('fill', self.fill)]:
|
|
146
|
+
if value is not None:
|
|
147
|
+
parts.append(f'{name}={value}')
|
|
148
|
+
return ' '.join(parts)
|
|
149
|
+
|
|
150
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
151
|
+
return value is not None or name in ('assign', 'flavor', 'values')
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class WhileIteration(BodyItem):
|
|
155
|
+
"""Represents one WHILE loop iteration."""
|
|
156
|
+
type = BodyItem.ITERATION
|
|
157
|
+
body_class = Body
|
|
158
|
+
__slots__ = ()
|
|
159
|
+
|
|
160
|
+
def __init__(self, parent: BodyItemParent = None):
|
|
161
|
+
self.parent = parent
|
|
162
|
+
self.body = ()
|
|
163
|
+
|
|
164
|
+
@setter
|
|
165
|
+
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
166
|
+
return self.body_class(self, body)
|
|
167
|
+
|
|
168
|
+
def visit(self, visitor: SuiteVisitor):
|
|
169
|
+
visitor.visit_while_iteration(self)
|
|
170
|
+
|
|
171
|
+
def to_dict(self) -> DataDict:
|
|
172
|
+
return {
|
|
173
|
+
'type': self.type,
|
|
174
|
+
'body': self.body.to_dicts()
|
|
175
|
+
}
|
|
176
|
+
|
|
108
177
|
|
|
109
178
|
@Body.register
|
|
110
179
|
class While(BodyItem):
|
|
@@ -133,18 +202,6 @@ class While(BodyItem):
|
|
|
133
202
|
def visit(self, visitor: SuiteVisitor):
|
|
134
203
|
visitor.visit_while(self)
|
|
135
204
|
|
|
136
|
-
def __str__(self) -> str:
|
|
137
|
-
parts = ['WHILE']
|
|
138
|
-
if self.condition is not None:
|
|
139
|
-
parts.append(self.condition)
|
|
140
|
-
if self.limit is not None:
|
|
141
|
-
parts.append(f'limit={self.limit}')
|
|
142
|
-
if self.on_limit is not None:
|
|
143
|
-
parts.append(f'limit={self.on_limit}')
|
|
144
|
-
if self.on_limit_message is not None:
|
|
145
|
-
parts.append(f'on_limit_message={self.on_limit_message}')
|
|
146
|
-
return ' '.join(parts)
|
|
147
|
-
|
|
148
205
|
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
149
206
|
return name == 'condition' or value is not None
|
|
150
207
|
|
|
@@ -159,6 +216,18 @@ class While(BodyItem):
|
|
|
159
216
|
data['body'] = self.body.to_dicts()
|
|
160
217
|
return data
|
|
161
218
|
|
|
219
|
+
def __str__(self) -> str:
|
|
220
|
+
parts = ['WHILE']
|
|
221
|
+
if self.condition is not None:
|
|
222
|
+
parts.append(self.condition)
|
|
223
|
+
if self.limit is not None:
|
|
224
|
+
parts.append(f'limit={self.limit}')
|
|
225
|
+
if self.on_limit is not None:
|
|
226
|
+
parts.append(f'on_limit={self.on_limit}')
|
|
227
|
+
if self.on_limit_message is not None:
|
|
228
|
+
parts.append(f'on_limit_message={self.on_limit_message}')
|
|
229
|
+
return ' '.join(parts)
|
|
230
|
+
|
|
162
231
|
|
|
163
232
|
class IfBranch(BodyItem):
|
|
164
233
|
"""Represents individual ``IF``, ``ELSE IF`` or ``ELSE`` branch."""
|
|
@@ -187,13 +256,6 @@ class IfBranch(BodyItem):
|
|
|
187
256
|
return self._get_id(self.parent)
|
|
188
257
|
return self._get_id(self.parent.parent)
|
|
189
258
|
|
|
190
|
-
def __str__(self) -> str:
|
|
191
|
-
if self.type == self.IF:
|
|
192
|
-
return f'IF {self.condition}'
|
|
193
|
-
if self.type == self.ELSE_IF:
|
|
194
|
-
return f'ELSE IF {self.condition}'
|
|
195
|
-
return 'ELSE'
|
|
196
|
-
|
|
197
259
|
def visit(self, visitor: SuiteVisitor):
|
|
198
260
|
visitor.visit_if_branch(self)
|
|
199
261
|
|
|
@@ -204,6 +266,13 @@ class IfBranch(BodyItem):
|
|
|
204
266
|
data['body'] = self.body.to_dicts()
|
|
205
267
|
return data
|
|
206
268
|
|
|
269
|
+
def __str__(self) -> str:
|
|
270
|
+
if self.type == self.IF:
|
|
271
|
+
return f'IF {self.condition}'
|
|
272
|
+
if self.type == self.ELSE_IF:
|
|
273
|
+
return f'ELSE IF {self.condition}'
|
|
274
|
+
return 'ELSE'
|
|
275
|
+
|
|
207
276
|
|
|
208
277
|
@Body.register
|
|
209
278
|
class If(BodyItem):
|
|
@@ -237,23 +306,36 @@ class If(BodyItem):
|
|
|
237
306
|
class TryBranch(BodyItem):
|
|
238
307
|
"""Represents individual ``TRY``, ``EXCEPT``, ``ELSE`` or ``FINALLY`` branch."""
|
|
239
308
|
body_class = Body
|
|
240
|
-
repr_args = ('type', 'patterns', 'pattern_type', '
|
|
241
|
-
__slots__ = ['type', 'patterns', 'pattern_type', '
|
|
309
|
+
repr_args = ('type', 'patterns', 'pattern_type', 'assign')
|
|
310
|
+
__slots__ = ['type', 'patterns', 'pattern_type', 'assign']
|
|
242
311
|
|
|
243
312
|
def __init__(self, type: str = BodyItem.TRY,
|
|
244
313
|
patterns: Sequence[str] = (),
|
|
245
314
|
pattern_type: 'str|None' = None,
|
|
246
|
-
|
|
315
|
+
assign: 'str|None' = None,
|
|
247
316
|
parent: BodyItemParent = None):
|
|
248
|
-
if (patterns or pattern_type or
|
|
249
|
-
raise TypeError(f"'{type}' branches do not accept patterns or
|
|
317
|
+
if (patterns or pattern_type or assign) and type != BodyItem.EXCEPT:
|
|
318
|
+
raise TypeError(f"'{type}' branches do not accept patterns or assignment.")
|
|
250
319
|
self.type = type
|
|
251
320
|
self.patterns = tuple(patterns)
|
|
252
321
|
self.pattern_type = pattern_type
|
|
253
|
-
self.
|
|
322
|
+
self.assign = assign
|
|
254
323
|
self.parent = parent
|
|
255
324
|
self.body = ()
|
|
256
325
|
|
|
326
|
+
@property
|
|
327
|
+
def variable(self) -> 'str|None': # TODO: Remove in RF 8.0.
|
|
328
|
+
"""Deprecated since Robot Framework 7.0. Use :attr:`assign` instead."""
|
|
329
|
+
warnings.warn("'TryBranch.variable' is deprecated and will be removed in "
|
|
330
|
+
"Robot Framework 8.0. Use 'TryBranch.assign' instead.")
|
|
331
|
+
return self.assign
|
|
332
|
+
|
|
333
|
+
@variable.setter
|
|
334
|
+
def variable(self, assign: 'str|None'):
|
|
335
|
+
warnings.warn("'TryBranch.variable' is deprecated and will be removed in "
|
|
336
|
+
"Robot Framework 8.0. Use 'TryBranch.assign' instead.")
|
|
337
|
+
self.assign = assign
|
|
338
|
+
|
|
257
339
|
@setter
|
|
258
340
|
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
259
341
|
return self.body_class(self, body)
|
|
@@ -267,19 +349,6 @@ class TryBranch(BodyItem):
|
|
|
267
349
|
return self._get_id(self.parent)
|
|
268
350
|
return self._get_id(self.parent.parent)
|
|
269
351
|
|
|
270
|
-
def __str__(self) -> str:
|
|
271
|
-
if self.type != BodyItem.EXCEPT:
|
|
272
|
-
return self.type
|
|
273
|
-
parts = ['EXCEPT', *self.patterns]
|
|
274
|
-
if self.pattern_type:
|
|
275
|
-
parts.append(f'type={self.pattern_type}')
|
|
276
|
-
if self.variable:
|
|
277
|
-
parts.extend(['AS', self.variable])
|
|
278
|
-
return ' '.join(parts)
|
|
279
|
-
|
|
280
|
-
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
281
|
-
return bool(value)
|
|
282
|
-
|
|
283
352
|
def visit(self, visitor: SuiteVisitor):
|
|
284
353
|
visitor.visit_try_branch(self)
|
|
285
354
|
|
|
@@ -289,11 +358,24 @@ class TryBranch(BodyItem):
|
|
|
289
358
|
data['patterns'] = self.patterns
|
|
290
359
|
if self.pattern_type:
|
|
291
360
|
data['pattern_type'] = self.pattern_type
|
|
292
|
-
if self.
|
|
293
|
-
data['
|
|
361
|
+
if self.assign:
|
|
362
|
+
data['assign'] = self.assign
|
|
294
363
|
data['body'] = self.body.to_dicts()
|
|
295
364
|
return data
|
|
296
365
|
|
|
366
|
+
def __str__(self) -> str:
|
|
367
|
+
if self.type != BodyItem.EXCEPT:
|
|
368
|
+
return self.type
|
|
369
|
+
parts = ['EXCEPT', *self.patterns]
|
|
370
|
+
if self.pattern_type:
|
|
371
|
+
parts.append(f'type={self.pattern_type}')
|
|
372
|
+
if self.assign:
|
|
373
|
+
parts.extend(['AS', self.assign])
|
|
374
|
+
return ' '.join(parts)
|
|
375
|
+
|
|
376
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
377
|
+
return bool(value)
|
|
378
|
+
|
|
297
379
|
|
|
298
380
|
@Body.register
|
|
299
381
|
class Try(BodyItem):
|
|
@@ -330,7 +412,7 @@ class Try(BodyItem):
|
|
|
330
412
|
return None
|
|
331
413
|
|
|
332
414
|
@property
|
|
333
|
-
def finally_branch(self):
|
|
415
|
+
def finally_branch(self) -> 'TryBranch|None':
|
|
334
416
|
if self.body and self.body[-1].type == BodyItem.FINALLY:
|
|
335
417
|
return cast(TryBranch, self.body[-1])
|
|
336
418
|
return None
|
|
@@ -348,6 +430,49 @@ class Try(BodyItem):
|
|
|
348
430
|
'body': self.body.to_dicts()}
|
|
349
431
|
|
|
350
432
|
|
|
433
|
+
@Body.register
|
|
434
|
+
class Var(BodyItem):
|
|
435
|
+
"""Represents ``VAR``."""
|
|
436
|
+
type = BodyItem.VAR
|
|
437
|
+
repr_args = ('name', 'value', 'scope', 'separator')
|
|
438
|
+
__slots__ = ['name', 'value', 'scope', 'separator']
|
|
439
|
+
|
|
440
|
+
def __init__(self, name: str = '',
|
|
441
|
+
value: 'str|Sequence[str]' = (),
|
|
442
|
+
scope: 'str|None' = None,
|
|
443
|
+
separator: 'str|None' = None,
|
|
444
|
+
parent: BodyItemParent = None):
|
|
445
|
+
self.name = name
|
|
446
|
+
self.value = (value,) if isinstance(value, str) else tuple(value)
|
|
447
|
+
self.scope = scope
|
|
448
|
+
self.separator = separator
|
|
449
|
+
self.parent = parent
|
|
450
|
+
|
|
451
|
+
def visit(self, visitor: SuiteVisitor):
|
|
452
|
+
visitor.visit_var(self)
|
|
453
|
+
|
|
454
|
+
def to_dict(self) -> DataDict:
|
|
455
|
+
data = {'type': self.type,
|
|
456
|
+
'name': self.name,
|
|
457
|
+
'value': self.value}
|
|
458
|
+
if self.scope is not None:
|
|
459
|
+
data['scope'] = self.scope
|
|
460
|
+
if self.separator is not None:
|
|
461
|
+
data['separator'] = self.separator
|
|
462
|
+
return data
|
|
463
|
+
|
|
464
|
+
def __str__(self):
|
|
465
|
+
parts = ['VAR', self.name, *self.value]
|
|
466
|
+
if self.separator is not None:
|
|
467
|
+
parts.append(f'separator={self.separator}')
|
|
468
|
+
if self.scope is not None:
|
|
469
|
+
parts.append(f'scope={self.scope}')
|
|
470
|
+
return ' '.join(parts)
|
|
471
|
+
|
|
472
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
473
|
+
return value is not None or name in ('name', 'value')
|
|
474
|
+
|
|
475
|
+
|
|
351
476
|
@Body.register
|
|
352
477
|
class Return(BodyItem):
|
|
353
478
|
"""Represents ``RETURN``."""
|
|
@@ -364,8 +489,16 @@ class Return(BodyItem):
|
|
|
364
489
|
visitor.visit_return(self)
|
|
365
490
|
|
|
366
491
|
def to_dict(self) -> DataDict:
|
|
367
|
-
|
|
368
|
-
|
|
492
|
+
data = {'type': self.type}
|
|
493
|
+
if self.values:
|
|
494
|
+
data['values'] = self.values
|
|
495
|
+
return data
|
|
496
|
+
|
|
497
|
+
def __str__(self):
|
|
498
|
+
return ' '.join(['RETURN', *self.values])
|
|
499
|
+
|
|
500
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
501
|
+
return bool(value)
|
|
369
502
|
|
|
370
503
|
|
|
371
504
|
@Body.register
|
|
@@ -383,6 +516,9 @@ class Continue(BodyItem):
|
|
|
383
516
|
def to_dict(self) -> DataDict:
|
|
384
517
|
return {'type': self.type}
|
|
385
518
|
|
|
519
|
+
def __str__(self):
|
|
520
|
+
return 'CONTINUE'
|
|
521
|
+
|
|
386
522
|
|
|
387
523
|
@Body.register
|
|
388
524
|
class Break(BodyItem):
|
|
@@ -399,6 +535,9 @@ class Break(BodyItem):
|
|
|
399
535
|
def to_dict(self) -> DataDict:
|
|
400
536
|
return {'type': self.type}
|
|
401
537
|
|
|
538
|
+
def __str__(self):
|
|
539
|
+
return 'BREAK'
|
|
540
|
+
|
|
402
541
|
|
|
403
542
|
@Body.register
|
|
404
543
|
class Error(BodyItem):
|
|
@@ -421,3 +560,6 @@ class Error(BodyItem):
|
|
|
421
560
|
def to_dict(self) -> DataDict:
|
|
422
561
|
return {'type': self.type,
|
|
423
562
|
'values': self.values}
|
|
563
|
+
|
|
564
|
+
def __str__(self):
|
|
565
|
+
return ' '.join(['ERROR', *self.values])
|
|
@@ -18,7 +18,7 @@ from typing import Sequence, TYPE_CHECKING
|
|
|
18
18
|
from robot.utils import setter
|
|
19
19
|
|
|
20
20
|
from .tags import TagPatterns
|
|
21
|
-
from .namepatterns import
|
|
21
|
+
from .namepatterns import NamePatterns
|
|
22
22
|
from .visitor import SuiteVisitor
|
|
23
23
|
|
|
24
24
|
if TYPE_CHECKING:
|
|
@@ -46,8 +46,8 @@ class EmptySuiteRemover(SuiteVisitor):
|
|
|
46
46
|
class Filter(EmptySuiteRemover):
|
|
47
47
|
|
|
48
48
|
def __init__(self,
|
|
49
|
-
include_suites: '
|
|
50
|
-
include_tests: '
|
|
49
|
+
include_suites: 'NamePatterns|Sequence[str]|None' = None,
|
|
50
|
+
include_tests: 'NamePatterns|Sequence[str]|None' = None,
|
|
51
51
|
include_tags: 'TagPatterns|Sequence[str]|None' = None,
|
|
52
52
|
exclude_tags: 'TagPatterns|Sequence[str]|None' = None):
|
|
53
53
|
super().__init__()
|
|
@@ -57,12 +57,12 @@ class Filter(EmptySuiteRemover):
|
|
|
57
57
|
self.exclude_tags = exclude_tags
|
|
58
58
|
|
|
59
59
|
@setter
|
|
60
|
-
def include_suites(self, suites) -> '
|
|
61
|
-
return self._patterns_or_none(suites,
|
|
60
|
+
def include_suites(self, suites) -> 'NamePatterns|None':
|
|
61
|
+
return self._patterns_or_none(suites, NamePatterns)
|
|
62
62
|
|
|
63
63
|
@setter
|
|
64
|
-
def include_tests(self, tests) -> '
|
|
65
|
-
return self._patterns_or_none(tests,
|
|
64
|
+
def include_tests(self, tests) -> 'NamePatterns|None':
|
|
65
|
+
return self._patterns_or_none(tests, NamePatterns)
|
|
66
66
|
|
|
67
67
|
@setter
|
|
68
68
|
def include_tags(self, tags) -> 'TagPatterns|None':
|
|
@@ -80,27 +80,33 @@ class Filter(EmptySuiteRemover):
|
|
|
80
80
|
def start_suite(self, suite: 'TestSuite'):
|
|
81
81
|
if not self:
|
|
82
82
|
return False
|
|
83
|
-
if hasattr(suite, '
|
|
84
|
-
suite.
|
|
83
|
+
if hasattr(suite, 'start_time'):
|
|
84
|
+
suite.start_time = suite.end_time = suite.elapsed_time = None
|
|
85
85
|
if self.include_suites is not None:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
include_tags=self.include_tags,
|
|
89
|
-
exclude_tags=self.exclude_tags))
|
|
90
|
-
return False
|
|
91
|
-
suite.tests = []
|
|
92
|
-
return True
|
|
93
|
-
if self.include_tests is not None:
|
|
94
|
-
suite.tests = [t for t in suite.tests
|
|
95
|
-
if self.include_tests.match(t.name, t.longname)]
|
|
96
|
-
if self.include_tags is not None:
|
|
97
|
-
suite.tests = [t for t in suite.tests
|
|
98
|
-
if self.include_tags.match(t.tags)]
|
|
99
|
-
if self.exclude_tags is not None:
|
|
100
|
-
suite.tests = [t for t in suite.tests
|
|
101
|
-
if not self.exclude_tags.match(t.tags)]
|
|
86
|
+
return self._filter_based_on_suite_name(suite)
|
|
87
|
+
suite.tests = [t for t in suite.tests if self._test_included(t)]
|
|
102
88
|
return bool(suite.suites)
|
|
103
89
|
|
|
90
|
+
def _filter_based_on_suite_name(self, suite: 'TestSuite') -> bool:
|
|
91
|
+
if self.include_suites.match(suite.name, suite.full_name):
|
|
92
|
+
suite.visit(Filter(include_tests=self.include_tests,
|
|
93
|
+
include_tags=self.include_tags,
|
|
94
|
+
exclude_tags=self.exclude_tags))
|
|
95
|
+
return False
|
|
96
|
+
suite.tests = []
|
|
97
|
+
return True
|
|
98
|
+
|
|
99
|
+
def _test_included(self, test: 'TestCase') -> bool:
|
|
100
|
+
tests, include, exclude \
|
|
101
|
+
= self.include_tests, self.include_tags, self.exclude_tags
|
|
102
|
+
if exclude is not None and exclude.match(test.tags):
|
|
103
|
+
return False
|
|
104
|
+
if include is not None and include.match(test.tags):
|
|
105
|
+
return True
|
|
106
|
+
if tests is not None and tests.match(test.name, test.full_name):
|
|
107
|
+
return True
|
|
108
|
+
return include is None and tests is None
|
|
109
|
+
|
|
104
110
|
def __bool__(self) -> bool:
|
|
105
111
|
return bool(self.include_suites is not None or
|
|
106
112
|
self.include_tests is not None or
|
|
@@ -108,14 +108,14 @@ class ItemList(MutableSequence[T]):
|
|
|
108
108
|
index += 1
|
|
109
109
|
|
|
110
110
|
@overload
|
|
111
|
-
def __getitem__(self, index: int) -> T:
|
|
111
|
+
def __getitem__(self, index: int, /) -> T:
|
|
112
112
|
...
|
|
113
113
|
|
|
114
114
|
@overload
|
|
115
|
-
def __getitem__(self: Self, index: slice) -> Self:
|
|
115
|
+
def __getitem__(self: Self, index: slice, /) -> Self:
|
|
116
116
|
...
|
|
117
117
|
|
|
118
|
-
def __getitem__(self, index):
|
|
118
|
+
def __getitem__(self: Self, index: 'int|slice', /) -> 'T|Self':
|
|
119
119
|
if isinstance(index, slice):
|
|
120
120
|
return self._create_new_from(self._items[index])
|
|
121
121
|
return self._items[index]
|
|
@@ -129,23 +129,24 @@ class ItemList(MutableSequence[T]):
|
|
|
129
129
|
return new
|
|
130
130
|
|
|
131
131
|
@overload
|
|
132
|
-
def __setitem__(self, index: int, item: 'T|DataDict'):
|
|
132
|
+
def __setitem__(self, index: int, item: 'T|DataDict', /):
|
|
133
133
|
...
|
|
134
134
|
|
|
135
135
|
@overload
|
|
136
|
-
def __setitem__(self, index: slice,
|
|
136
|
+
def __setitem__(self, index: slice, items: 'Iterable[T|DataDict]', /):
|
|
137
137
|
...
|
|
138
138
|
|
|
139
|
-
def __setitem__(self, index,
|
|
139
|
+
def __setitem__(self, index: 'int|slice',
|
|
140
|
+
item: 'T|DataDict|Iterable[T|DataDict]', /):
|
|
140
141
|
if isinstance(index, slice):
|
|
141
142
|
self._items[index] = [self._check_type_and_set_attrs(i) for i in item]
|
|
142
143
|
else:
|
|
143
144
|
self._items[index] = self._check_type_and_set_attrs(item)
|
|
144
145
|
|
|
145
|
-
def __delitem__(self, index: 'int|slice'):
|
|
146
|
+
def __delitem__(self, index: 'int|slice', /):
|
|
146
147
|
del self._items[index]
|
|
147
148
|
|
|
148
|
-
def __contains__(self, item:
|
|
149
|
+
def __contains__(self, item: Any, /) -> bool:
|
|
149
150
|
return item in self._items
|
|
150
151
|
|
|
151
152
|
def __len__(self) -> int:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Copyright 2008-2015 Nokia Networks
|
|
2
|
+
# Copyright 2016- Robot Framework Foundation
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
from typing import Any, Dict, List, Sequence, Tuple, TYPE_CHECKING, Union
|
|
17
|
+
|
|
18
|
+
from .body import Body, BodyItem, BodyItemParent
|
|
19
|
+
from .modelobject import DataDict
|
|
20
|
+
|
|
21
|
+
if TYPE_CHECKING:
|
|
22
|
+
from .visitor import SuiteVisitor
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Arguments = Union[Sequence[Union[Any, Tuple[Any], Tuple[str, Any]]],
|
|
26
|
+
Tuple[List[Any], Dict[str, Any]]]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@Body.register
|
|
30
|
+
class Keyword(BodyItem):
|
|
31
|
+
"""Base model for a single keyword.
|
|
32
|
+
|
|
33
|
+
Extended by :class:`robot.running.model.Keyword` and
|
|
34
|
+
:class:`robot.result.model.Keyword`.
|
|
35
|
+
|
|
36
|
+
Arguments from normal data are always strings, but other types are possible in
|
|
37
|
+
programmatic usage. See the docstrings of the extending classes for more details.
|
|
38
|
+
"""
|
|
39
|
+
repr_args = ('name', 'args', 'assign')
|
|
40
|
+
__slots__ = ['name', 'args', 'assign', 'type']
|
|
41
|
+
|
|
42
|
+
def __init__(self, name: 'str|None' = '',
|
|
43
|
+
args: Arguments = (),
|
|
44
|
+
assign: Sequence[str] = (),
|
|
45
|
+
type: str = BodyItem.KEYWORD,
|
|
46
|
+
parent: BodyItemParent = None):
|
|
47
|
+
self.name = name
|
|
48
|
+
self.args = tuple(args)
|
|
49
|
+
self.assign = tuple(assign)
|
|
50
|
+
self.type = type
|
|
51
|
+
self.parent = parent
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def id(self) -> 'str|None':
|
|
55
|
+
if not self:
|
|
56
|
+
return None
|
|
57
|
+
return super().id
|
|
58
|
+
|
|
59
|
+
def visit(self, visitor: 'SuiteVisitor'):
|
|
60
|
+
""":mod:`Visitor interface <robot.model.visitor>` entry-point."""
|
|
61
|
+
if self:
|
|
62
|
+
visitor.visit_keyword(self)
|
|
63
|
+
|
|
64
|
+
def __bool__(self) -> bool:
|
|
65
|
+
return self.name is not None
|
|
66
|
+
|
|
67
|
+
def __str__(self) -> str:
|
|
68
|
+
parts = list(self.assign) + [self.name] + list(self.args)
|
|
69
|
+
return ' '.join(str(p) for p in parts)
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> DataDict:
|
|
72
|
+
data: DataDict = {'name': self.name}
|
|
73
|
+
if self.args:
|
|
74
|
+
data['args'] = self.args
|
|
75
|
+
if self.assign:
|
|
76
|
+
data['assign'] = self.assign
|
|
77
|
+
return data
|