robotframework 6.1rc1__zip → 7.0a1__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework-6.1rc1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/interfaces.py +36 -49
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/control.py +155 -85
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modelobject.py +2 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/testsuite.py +43 -24
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/run.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +210 -220
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +15 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +15 -10
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/model.py +156 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +35 -39
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1rc1 → robotframework-7.0a1}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1rc1/src/robot/model/keyword.py +0 -173
- robotframework-6.1rc1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1rc1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1rc1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1rc1/src/robot/output/listeners.py +0 -174
- robotframework-6.1rc1/src/robot/output/output.py +0 -95
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -59,29 +59,33 @@ class SuiteConfigurer(SuiteVisitor):
|
|
|
59
59
|
name = suite.name
|
|
60
60
|
suite.filter(self.include_suites, self.include_tests,
|
|
61
61
|
self.include_tags, self.exclude_tags)
|
|
62
|
-
if not (suite.
|
|
63
|
-
self.
|
|
62
|
+
if not (suite.has_tests or self.empty_suite_ok):
|
|
63
|
+
self._raise_no_tests_or_tasks_error(name, suite.rpa)
|
|
64
64
|
|
|
65
|
-
def
|
|
66
|
-
parts = ['tests'
|
|
65
|
+
def _raise_no_tests_or_tasks_error(self, name, rpa):
|
|
66
|
+
parts = [{False: 'tests', True: 'tasks', None: 'tests or tasks'}[rpa],
|
|
67
67
|
self._get_test_selector_msgs(),
|
|
68
68
|
self._get_suite_selector_msg()]
|
|
69
|
-
raise DataError("Suite '
|
|
70
|
-
|
|
69
|
+
raise DataError(f"Suite '{name}' contains no "
|
|
70
|
+
f"{' '.join(p for p in parts if p)}.")
|
|
71
71
|
|
|
72
72
|
def _get_test_selector_msgs(self):
|
|
73
73
|
parts = []
|
|
74
|
-
for explanation,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
for separator, explanation, selectors in [
|
|
75
|
+
(None, 'matching name', self.include_tests),
|
|
76
|
+
('or', 'matching tags', self.include_tags),
|
|
77
|
+
('and', 'not matching tags', self.exclude_tags)
|
|
78
|
+
]:
|
|
79
|
+
if selectors:
|
|
80
|
+
if parts:
|
|
81
|
+
parts.append(separator)
|
|
82
|
+
parts.append(self._format_selector_msg(explanation, selectors))
|
|
83
|
+
return ' '.join(parts)
|
|
80
84
|
|
|
81
|
-
def _format_selector_msg(self, explanation,
|
|
82
|
-
if len(
|
|
85
|
+
def _format_selector_msg(self, explanation, selectors):
|
|
86
|
+
if len(selectors) == 1 and explanation[-1] == 's':
|
|
83
87
|
explanation = explanation[:-1]
|
|
84
|
-
return
|
|
88
|
+
return f"{explanation} {seq2str(selectors, lastsep=' or ')}"
|
|
85
89
|
|
|
86
90
|
def _get_suite_selector_msg(self):
|
|
87
91
|
if not self.include_suites:
|
|
@@ -13,15 +13,12 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
from typing import Any, cast, Sequence, TypeVar, TYPE_CHECKING
|
|
18
|
-
if sys.version_info >= (3, 8):
|
|
19
|
-
from typing import Literal
|
|
16
|
+
import warnings
|
|
17
|
+
from typing import Any, cast, Literal, Sequence, TypeVar, TYPE_CHECKING
|
|
20
18
|
|
|
21
19
|
from robot.utils import setter
|
|
22
20
|
|
|
23
21
|
from .body import Body, BodyItem, BodyItemParent, BaseBranches
|
|
24
|
-
from .keyword import Keywords
|
|
25
22
|
from .modelobject import DataDict
|
|
26
23
|
from .visitor import SuiteVisitor
|
|
27
24
|
|
|
@@ -31,31 +28,27 @@ if TYPE_CHECKING:
|
|
|
31
28
|
IT = TypeVar('IT', bound='IfBranch|TryBranch')
|
|
32
29
|
|
|
33
30
|
|
|
34
|
-
class Branches(BaseBranches['Keyword', 'For', 'While', 'If', 'Try', '
|
|
35
|
-
'Break', 'Message', 'Error', IT]):
|
|
31
|
+
class Branches(BaseBranches['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
|
|
32
|
+
'Continue', 'Break', 'Message', 'Error', IT]):
|
|
36
33
|
pass
|
|
37
34
|
|
|
38
35
|
|
|
39
36
|
@Body.register
|
|
40
37
|
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
|
-
"""
|
|
38
|
+
"""Represents ``FOR`` loops."""
|
|
46
39
|
type = BodyItem.FOR
|
|
47
40
|
body_class = Body
|
|
48
|
-
repr_args = ('
|
|
49
|
-
__slots__ = ['
|
|
41
|
+
repr_args = ('assign', 'flavor', 'values', 'start', 'mode', 'fill')
|
|
42
|
+
__slots__ = ['assign', 'flavor', 'values', 'start', 'mode', 'fill']
|
|
50
43
|
|
|
51
|
-
def __init__(self,
|
|
52
|
-
flavor:
|
|
44
|
+
def __init__(self, assign: Sequence[str] = (),
|
|
45
|
+
flavor: Literal['IN', 'IN RANGE', 'IN ENUMERATE', 'IN ZIP'] = 'IN',
|
|
53
46
|
values: Sequence[str] = (),
|
|
54
47
|
start: 'str|None' = None,
|
|
55
48
|
mode: 'str|None' = None,
|
|
56
49
|
fill: 'str|None' = None,
|
|
57
50
|
parent: BodyItemParent = None):
|
|
58
|
-
self.
|
|
51
|
+
self.assign = tuple(assign)
|
|
59
52
|
self.flavor = flavor
|
|
60
53
|
self.values = tuple(values)
|
|
61
54
|
self.start = start
|
|
@@ -64,37 +57,29 @@ class For(BodyItem):
|
|
|
64
57
|
self.parent = parent
|
|
65
58
|
self.body = ()
|
|
66
59
|
|
|
60
|
+
@property
|
|
61
|
+
def variables(self) -> 'tuple[str, ...]': # TODO: Remove in RF 8.0.
|
|
62
|
+
"""Deprecated since Robot Framework 7.0. Use :attr:`assign` instead."""
|
|
63
|
+
warnings.warn("'For.variables' is deprecated and will be removed in "
|
|
64
|
+
"Robot Framework 8.0. Use 'For.assign' instead.")
|
|
65
|
+
return self.assign
|
|
66
|
+
|
|
67
|
+
@variables.setter
|
|
68
|
+
def variables(self, assign: 'tuple[str, ...]'):
|
|
69
|
+
warnings.warn("'For.variables' is deprecated and will be removed in "
|
|
70
|
+
"Robot Framework 8.0. Use 'For.assign' instead.")
|
|
71
|
+
self.assign = assign
|
|
72
|
+
|
|
67
73
|
@setter
|
|
68
74
|
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
69
75
|
return self.body_class(self, body)
|
|
70
76
|
|
|
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
77
|
def visit(self, visitor: SuiteVisitor):
|
|
81
78
|
visitor.visit_for(self)
|
|
82
79
|
|
|
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
80
|
def to_dict(self) -> DataDict:
|
|
96
81
|
data = {'type': self.type,
|
|
97
|
-
'
|
|
82
|
+
'assign': self.assign,
|
|
98
83
|
'flavor': self.flavor,
|
|
99
84
|
'values': self.values}
|
|
100
85
|
for name, value in [('start', self.start),
|
|
@@ -105,6 +90,18 @@ class For(BodyItem):
|
|
|
105
90
|
data['body'] = self.body.to_dicts()
|
|
106
91
|
return data
|
|
107
92
|
|
|
93
|
+
def __str__(self):
|
|
94
|
+
parts = ['FOR', *self.assign, self.flavor, *self.values]
|
|
95
|
+
for name, value in [('start', self.start),
|
|
96
|
+
('mode', self.mode),
|
|
97
|
+
('fill', self.fill)]:
|
|
98
|
+
if value is not None:
|
|
99
|
+
parts.append(f'{name}={value}')
|
|
100
|
+
return ' '.join(parts)
|
|
101
|
+
|
|
102
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
103
|
+
return value is not None or name in ('assign', 'flavor', 'values')
|
|
104
|
+
|
|
108
105
|
|
|
109
106
|
@Body.register
|
|
110
107
|
class While(BodyItem):
|
|
@@ -133,18 +130,6 @@ class While(BodyItem):
|
|
|
133
130
|
def visit(self, visitor: SuiteVisitor):
|
|
134
131
|
visitor.visit_while(self)
|
|
135
132
|
|
|
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
133
|
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
149
134
|
return name == 'condition' or value is not None
|
|
150
135
|
|
|
@@ -152,12 +137,25 @@ class While(BodyItem):
|
|
|
152
137
|
data: DataDict = {'type': self.type}
|
|
153
138
|
for name, value in [('condition', self.condition),
|
|
154
139
|
('limit', self.limit),
|
|
140
|
+
('on_limit', self.on_limit),
|
|
155
141
|
('on_limit_message', self.on_limit_message)]:
|
|
156
142
|
if value is not None:
|
|
157
143
|
data[name] = value
|
|
158
144
|
data['body'] = self.body.to_dicts()
|
|
159
145
|
return data
|
|
160
146
|
|
|
147
|
+
def __str__(self) -> str:
|
|
148
|
+
parts = ['WHILE']
|
|
149
|
+
if self.condition is not None:
|
|
150
|
+
parts.append(self.condition)
|
|
151
|
+
if self.limit is not None:
|
|
152
|
+
parts.append(f'limit={self.limit}')
|
|
153
|
+
if self.on_limit is not None:
|
|
154
|
+
parts.append(f'on_limit={self.on_limit}')
|
|
155
|
+
if self.on_limit_message is not None:
|
|
156
|
+
parts.append(f'on_limit_message={self.on_limit_message}')
|
|
157
|
+
return ' '.join(parts)
|
|
158
|
+
|
|
161
159
|
|
|
162
160
|
class IfBranch(BodyItem):
|
|
163
161
|
"""Represents individual ``IF``, ``ELSE IF`` or ``ELSE`` branch."""
|
|
@@ -186,6 +184,16 @@ class IfBranch(BodyItem):
|
|
|
186
184
|
return self._get_id(self.parent)
|
|
187
185
|
return self._get_id(self.parent.parent)
|
|
188
186
|
|
|
187
|
+
def visit(self, visitor: SuiteVisitor):
|
|
188
|
+
visitor.visit_if_branch(self)
|
|
189
|
+
|
|
190
|
+
def to_dict(self) -> DataDict:
|
|
191
|
+
data = {'type': self.type}
|
|
192
|
+
if self.condition:
|
|
193
|
+
data['condition'] = self.condition
|
|
194
|
+
data['body'] = self.body.to_dicts()
|
|
195
|
+
return data
|
|
196
|
+
|
|
189
197
|
def __str__(self) -> str:
|
|
190
198
|
if self.type == self.IF:
|
|
191
199
|
return f'IF {self.condition}'
|
|
@@ -193,17 +201,6 @@ class IfBranch(BodyItem):
|
|
|
193
201
|
return f'ELSE IF {self.condition}'
|
|
194
202
|
return 'ELSE'
|
|
195
203
|
|
|
196
|
-
def visit(self, visitor: SuiteVisitor):
|
|
197
|
-
visitor.visit_if_branch(self)
|
|
198
|
-
|
|
199
|
-
def to_dict(self) -> DataDict:
|
|
200
|
-
data = {'type': self.type,
|
|
201
|
-
'condition': self.condition,
|
|
202
|
-
'body': self.body.to_dicts()}
|
|
203
|
-
if self.type == self.ELSE:
|
|
204
|
-
data.pop('condition')
|
|
205
|
-
return data
|
|
206
|
-
|
|
207
204
|
|
|
208
205
|
@Body.register
|
|
209
206
|
class If(BodyItem):
|
|
@@ -237,23 +234,36 @@ class If(BodyItem):
|
|
|
237
234
|
class TryBranch(BodyItem):
|
|
238
235
|
"""Represents individual ``TRY``, ``EXCEPT``, ``ELSE`` or ``FINALLY`` branch."""
|
|
239
236
|
body_class = Body
|
|
240
|
-
repr_args = ('type', 'patterns', 'pattern_type', '
|
|
241
|
-
__slots__ = ['type', 'patterns', 'pattern_type', '
|
|
237
|
+
repr_args = ('type', 'patterns', 'pattern_type', 'assign')
|
|
238
|
+
__slots__ = ['type', 'patterns', 'pattern_type', 'assign']
|
|
242
239
|
|
|
243
240
|
def __init__(self, type: str = BodyItem.TRY,
|
|
244
241
|
patterns: Sequence[str] = (),
|
|
245
242
|
pattern_type: 'str|None' = None,
|
|
246
|
-
|
|
243
|
+
assign: 'str|None' = None,
|
|
247
244
|
parent: BodyItemParent = None):
|
|
248
|
-
if (patterns or pattern_type or
|
|
249
|
-
raise TypeError(f"'{type}' branches do not accept patterns or
|
|
245
|
+
if (patterns or pattern_type or assign) and type != BodyItem.EXCEPT:
|
|
246
|
+
raise TypeError(f"'{type}' branches do not accept patterns or assignment.")
|
|
250
247
|
self.type = type
|
|
251
248
|
self.patterns = tuple(patterns)
|
|
252
249
|
self.pattern_type = pattern_type
|
|
253
|
-
self.
|
|
250
|
+
self.assign = assign
|
|
254
251
|
self.parent = parent
|
|
255
252
|
self.body = ()
|
|
256
253
|
|
|
254
|
+
@property
|
|
255
|
+
def variable(self) -> 'str|None': # TODO: Remove in RF 8.0.
|
|
256
|
+
"""Deprecated since Robot Framework 7.0. Use :attr:`assign` instead."""
|
|
257
|
+
warnings.warn("'TryBranch.variable' is deprecated and will be removed in "
|
|
258
|
+
"Robot Framework 8.0. Use 'TryBranch.assign' instead.")
|
|
259
|
+
return self.assign
|
|
260
|
+
|
|
261
|
+
@variable.setter
|
|
262
|
+
def variable(self, assign: 'str|None'):
|
|
263
|
+
warnings.warn("'TryBranch.variable' is deprecated and will be removed in "
|
|
264
|
+
"Robot Framework 8.0. Use 'TryBranch.assign' instead.")
|
|
265
|
+
self.assign = assign
|
|
266
|
+
|
|
257
267
|
@setter
|
|
258
268
|
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
259
269
|
return self.body_class(self, body)
|
|
@@ -267,19 +277,6 @@ class TryBranch(BodyItem):
|
|
|
267
277
|
return self._get_id(self.parent)
|
|
268
278
|
return self._get_id(self.parent.parent)
|
|
269
279
|
|
|
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
280
|
def visit(self, visitor: SuiteVisitor):
|
|
284
281
|
visitor.visit_try_branch(self)
|
|
285
282
|
|
|
@@ -289,11 +286,24 @@ class TryBranch(BodyItem):
|
|
|
289
286
|
data['patterns'] = self.patterns
|
|
290
287
|
if self.pattern_type:
|
|
291
288
|
data['pattern_type'] = self.pattern_type
|
|
292
|
-
if self.
|
|
293
|
-
data['
|
|
289
|
+
if self.assign:
|
|
290
|
+
data['assign'] = self.assign
|
|
294
291
|
data['body'] = self.body.to_dicts()
|
|
295
292
|
return data
|
|
296
293
|
|
|
294
|
+
def __str__(self) -> str:
|
|
295
|
+
if self.type != BodyItem.EXCEPT:
|
|
296
|
+
return self.type
|
|
297
|
+
parts = ['EXCEPT', *self.patterns]
|
|
298
|
+
if self.pattern_type:
|
|
299
|
+
parts.append(f'type={self.pattern_type}')
|
|
300
|
+
if self.assign:
|
|
301
|
+
parts.extend(['AS', self.assign])
|
|
302
|
+
return ' '.join(parts)
|
|
303
|
+
|
|
304
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
305
|
+
return bool(value)
|
|
306
|
+
|
|
297
307
|
|
|
298
308
|
@Body.register
|
|
299
309
|
class Try(BodyItem):
|
|
@@ -348,6 +358,49 @@ class Try(BodyItem):
|
|
|
348
358
|
'body': self.body.to_dicts()}
|
|
349
359
|
|
|
350
360
|
|
|
361
|
+
@Body.register
|
|
362
|
+
class Var(BodyItem):
|
|
363
|
+
"""Represents ``VAR``."""
|
|
364
|
+
type = BodyItem.VAR
|
|
365
|
+
repr_args = ('name', 'value', 'scope', 'separator')
|
|
366
|
+
__slots__ = ['name', 'value', 'scope', 'separator']
|
|
367
|
+
|
|
368
|
+
def __init__(self, name: str = '',
|
|
369
|
+
value: 'str|Sequence[str]' = (),
|
|
370
|
+
scope: 'str|None' = None,
|
|
371
|
+
separator: 'str|None' = None,
|
|
372
|
+
parent: BodyItemParent = None):
|
|
373
|
+
self.name = name
|
|
374
|
+
self.value = (value,) if isinstance(value, str) else tuple(value)
|
|
375
|
+
self.scope = scope
|
|
376
|
+
self.separator = separator
|
|
377
|
+
self.parent = parent
|
|
378
|
+
|
|
379
|
+
def visit(self, visitor: SuiteVisitor):
|
|
380
|
+
visitor.visit_var(self)
|
|
381
|
+
|
|
382
|
+
def to_dict(self) -> DataDict:
|
|
383
|
+
data = {'type': self.type,
|
|
384
|
+
'name': self.name,
|
|
385
|
+
'value': self.value}
|
|
386
|
+
if self.scope is not None:
|
|
387
|
+
data['scope'] = self.scope
|
|
388
|
+
if self.separator is not None:
|
|
389
|
+
data['separator'] = self.separator
|
|
390
|
+
return data
|
|
391
|
+
|
|
392
|
+
def __str__(self):
|
|
393
|
+
parts = ['VAR', self.name, *self.value]
|
|
394
|
+
if self.separator is not None:
|
|
395
|
+
parts.append(f'separator={self.separator}')
|
|
396
|
+
if self.scope is not None:
|
|
397
|
+
parts.append(f'scope={self.scope}')
|
|
398
|
+
return ' '.join(parts)
|
|
399
|
+
|
|
400
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
401
|
+
return value is not None or name in ('name', 'value')
|
|
402
|
+
|
|
403
|
+
|
|
351
404
|
@Body.register
|
|
352
405
|
class Return(BodyItem):
|
|
353
406
|
"""Represents ``RETURN``."""
|
|
@@ -364,8 +417,16 @@ class Return(BodyItem):
|
|
|
364
417
|
visitor.visit_return(self)
|
|
365
418
|
|
|
366
419
|
def to_dict(self) -> DataDict:
|
|
367
|
-
|
|
368
|
-
|
|
420
|
+
data = {'type': self.type}
|
|
421
|
+
if self.values:
|
|
422
|
+
data['values'] = self.values
|
|
423
|
+
return data
|
|
424
|
+
|
|
425
|
+
def __str__(self):
|
|
426
|
+
return ' '.join(['RETURN', *self.values])
|
|
427
|
+
|
|
428
|
+
def _include_in_repr(self, name: str, value: Any) -> bool:
|
|
429
|
+
return bool(value)
|
|
369
430
|
|
|
370
431
|
|
|
371
432
|
@Body.register
|
|
@@ -383,6 +444,9 @@ class Continue(BodyItem):
|
|
|
383
444
|
def to_dict(self) -> DataDict:
|
|
384
445
|
return {'type': self.type}
|
|
385
446
|
|
|
447
|
+
def __str__(self):
|
|
448
|
+
return 'CONTINUE'
|
|
449
|
+
|
|
386
450
|
|
|
387
451
|
@Body.register
|
|
388
452
|
class Break(BodyItem):
|
|
@@ -399,6 +463,9 @@ class Break(BodyItem):
|
|
|
399
463
|
def to_dict(self) -> DataDict:
|
|
400
464
|
return {'type': self.type}
|
|
401
465
|
|
|
466
|
+
def __str__(self):
|
|
467
|
+
return 'BREAK'
|
|
468
|
+
|
|
402
469
|
|
|
403
470
|
@Body.register
|
|
404
471
|
class Error(BodyItem):
|
|
@@ -421,3 +488,6 @@ class Error(BodyItem):
|
|
|
421
488
|
def to_dict(self) -> DataDict:
|
|
422
489
|
return {'type': self.type,
|
|
423
490
|
'values': self.values}
|
|
491
|
+
|
|
492
|
+
def __str__(self):
|
|
493
|
+
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
|
|
@@ -0,0 +1,70 @@
|
|
|
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 Sequence, TYPE_CHECKING
|
|
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
|
+
@Body.register
|
|
26
|
+
class Keyword(BodyItem):
|
|
27
|
+
"""Base model for a single keyword.
|
|
28
|
+
|
|
29
|
+
Extended by :class:`robot.running.model.Keyword` and
|
|
30
|
+
:class:`robot.result.model.Keyword`.
|
|
31
|
+
"""
|
|
32
|
+
repr_args = ('name', 'args', 'assign')
|
|
33
|
+
__slots__ = ['name', 'args', 'assign', 'type']
|
|
34
|
+
|
|
35
|
+
def __init__(self, name: 'str|None' = '',
|
|
36
|
+
args: Sequence[str] = (),
|
|
37
|
+
assign: Sequence[str] = (),
|
|
38
|
+
type: str = BodyItem.KEYWORD,
|
|
39
|
+
parent: BodyItemParent = None):
|
|
40
|
+
self.name = name
|
|
41
|
+
self.args = tuple(args)
|
|
42
|
+
self.assign = tuple(assign)
|
|
43
|
+
self.type = type
|
|
44
|
+
self.parent = parent
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def id(self) -> 'str|None':
|
|
48
|
+
if not self:
|
|
49
|
+
return None
|
|
50
|
+
return super().id
|
|
51
|
+
|
|
52
|
+
def visit(self, visitor: 'SuiteVisitor'):
|
|
53
|
+
""":mod:`Visitor interface <robot.model.visitor>` entry-point."""
|
|
54
|
+
if self:
|
|
55
|
+
visitor.visit_keyword(self)
|
|
56
|
+
|
|
57
|
+
def __bool__(self) -> bool:
|
|
58
|
+
return self.name is not None
|
|
59
|
+
|
|
60
|
+
def __str__(self) -> str:
|
|
61
|
+
parts = list(self.assign) + [self.name] + list(self.args)
|
|
62
|
+
return ' '.join(str(p) for p in parts)
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> DataDict:
|
|
65
|
+
data: DataDict = {'name': self.name}
|
|
66
|
+
if self.args:
|
|
67
|
+
data['args'] = self.args
|
|
68
|
+
if self.assign:
|
|
69
|
+
data['assign'] = self.assign
|
|
70
|
+
return data
|
|
@@ -13,12 +13,18 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from
|
|
16
|
+
from datetime import datetime
|
|
17
|
+
from typing import Literal
|
|
18
|
+
|
|
19
|
+
from robot.utils import html_escape, setter
|
|
17
20
|
|
|
18
21
|
from .body import BodyItem
|
|
19
22
|
from .itemlist import ItemList
|
|
20
23
|
|
|
21
24
|
|
|
25
|
+
MessageLevel = Literal['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FAIL', 'SKIP']
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
class Message(BodyItem):
|
|
23
29
|
"""A message created during the test execution.
|
|
24
30
|
|
|
@@ -27,22 +33,25 @@ class Message(BodyItem):
|
|
|
27
33
|
"""
|
|
28
34
|
type = BodyItem.MESSAGE
|
|
29
35
|
repr_args = ('message', 'level')
|
|
30
|
-
__slots__ = ['message', 'level', 'html', '
|
|
36
|
+
__slots__ = ['message', 'level', 'html', '_timestamp']
|
|
31
37
|
|
|
32
|
-
def __init__(self, message=
|
|
33
|
-
|
|
38
|
+
def __init__(self, message: str = '',
|
|
39
|
+
level: MessageLevel = 'INFO',
|
|
40
|
+
html: bool = False,
|
|
41
|
+
timestamp: 'datetime|str|None' = None,
|
|
42
|
+
parent: 'BodyItem|None' = None):
|
|
34
43
|
self.message = message
|
|
35
|
-
#: Severity of the message. Either ``TRACE``, ``DEBUG``, ``INFO``,
|
|
36
|
-
#: ``WARN``, ``ERROR``, ``FAIL`` or ``SKIP`. The last two are only used
|
|
37
|
-
#: with keyword failure messages.
|
|
38
44
|
self.level = level
|
|
39
|
-
#: ``True`` if the content is in HTML, ``False`` otherwise.
|
|
40
45
|
self.html = html
|
|
41
|
-
#: Timestamp in format ``%Y%m%d %H:%M:%S.%f``.
|
|
42
46
|
self.timestamp = timestamp
|
|
43
|
-
#: The object this message was triggered by.
|
|
44
47
|
self.parent = parent
|
|
45
48
|
|
|
49
|
+
@setter
|
|
50
|
+
def timestamp(self, timestamp: 'datetime|str|None') -> 'datetime|None':
|
|
51
|
+
if isinstance(timestamp, str):
|
|
52
|
+
return datetime.fromisoformat(timestamp)
|
|
53
|
+
return timestamp
|
|
54
|
+
|
|
46
55
|
@property
|
|
47
56
|
def html_message(self):
|
|
48
57
|
"""Returns the message content as HTML."""
|
|
@@ -150,10 +150,7 @@ class ModelObject(metaclass=SetterAwareType):
|
|
|
150
150
|
|
|
151
151
|
__ https://docs.python.org/3/library/copy.html
|
|
152
152
|
"""
|
|
153
|
-
|
|
154
|
-
for name in attributes:
|
|
155
|
-
setattr(copied, name, attributes[name])
|
|
156
|
-
return copied
|
|
153
|
+
return copy.copy(self).config(**attributes)
|
|
157
154
|
|
|
158
155
|
def deepcopy(self: T, **attributes) -> T:
|
|
159
156
|
"""Return a deep copy of this object.
|
|
@@ -167,10 +164,7 @@ class ModelObject(metaclass=SetterAwareType):
|
|
|
167
164
|
|
|
168
165
|
__ https://docs.python.org/3/library/copy.html
|
|
169
166
|
"""
|
|
170
|
-
|
|
171
|
-
for name in attributes:
|
|
172
|
-
setattr(copied, name, attributes[name])
|
|
173
|
-
return copied
|
|
167
|
+
return copy.deepcopy(self).config(**attributes)
|
|
174
168
|
|
|
175
169
|
def __repr__(self) -> str:
|
|
176
170
|
arguments = [(name, getattr(self, name)) for name in self.repr_args]
|