robotframework 6.1rc1__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.1rc1 → robotframework-7.0}/INSTALL.rst +25 -25
- {robotframework-6.1rc1 → robotframework-7.0}/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/README.rst +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/setup.py +3 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/__init__.py +4 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/deco.py +60 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/exceptions.py +6 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/interfaces.py +403 -68
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/logger.py +27 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/api/parsing.py +4 -2
- robotframework-7.0/src/robot/api/py.typed +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/languages.py +61 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/settings.py +21 -14
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/storage.js +11 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/htmlfilewriter.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.css +10 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/libdoc.html +10 -0
- robotframework-7.0/src/robot/htmldata/rebot/common.css +362 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/doc_formatting.css +13 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.css +51 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.html +14 -23
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.css +83 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/report.html +22 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/view.js +84 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonbuilder.py +38 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/model.py +21 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/robotbuilder.py +50 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/standardtypes.py +9 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlbuilder.py +35 -20
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/xmlwriter.py +18 -38
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/BuiltIn.py +255 -205
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Collections.py +384 -240
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/DateTime.py +73 -60
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/OperatingSystem.py +6 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/String.py +66 -76
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/XML.py +66 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/dialogs_py.py +14 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/__init__.py +5 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/body.py +44 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/configurer.py +19 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/control.py +230 -88
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/filter.py +31 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/itemlist.py +9 -8
- robotframework-7.0/src/robot/model/keyword.py +77 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/message.py +19 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modelobject.py +27 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/modifier.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/stats.py +9 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tags.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testcase.py +15 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/testsuite.py +44 -28
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/visitor.py +35 -8
- robotframework-7.0/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/verbose.py +61 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/debugfile.py +39 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/filelogger.py +18 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/librarylogger.py +3 -2
- robotframework-7.0/src/robot/output/listeners.py +753 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/logger.py +216 -80
- robotframework-7.0/src/robot/output/loggerapi.py +215 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0/src/robot/output/output.py +185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/stdoutlogsplitter.py +8 -5
- robotframework-7.0/src/robot/output/xmllogger.py +459 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/statements.py +193 -94
- robotframework-7.0/src/robot/parsing/model/visitor.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/rebot.py +2 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/logreportwriters.py +16 -10
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/outputwriter.py +18 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/resultwriter.py +4 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/stringcache.py +3 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionresult.py +56 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/flattenkeywordmatcher.py +48 -9
- robotframework-7.0/src/robot/result/keywordremover.py +207 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/merger.py +1 -1
- robotframework-7.0/src/robot/result/model.py +1185 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/resultbuilder.py +46 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/xmlelementhandlers.py +83 -43
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/run.py +3 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/__init__.py +14 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/__init__.py +2 -1
- robotframework-7.0/src/robot/running/arguments/argumentconverter.py +100 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentmapper.py +26 -24
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentparser.py +85 -61
- robotframework-7.0/src/robot/running/arguments/argumentresolver.py +158 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentspec.py +83 -116
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/argumentvalidator.py +33 -27
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/customconverters.py +15 -12
- robotframework-7.0/src/robot/running/arguments/embedded.py +145 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/arguments/typeconverters.py +268 -220
- 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.1rc1 → robotframework-7.0}/src/robot/running/bodyrunner.py +147 -129
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/builders.py +17 -26
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/parsers.py +17 -11
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/settings.py +9 -17
- robotframework-7.0/src/robot/running/builder/transformers.py +535 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/context.py +113 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/dynamicmethods.py +62 -34
- {robotframework-6.1rc1 → 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.1rc1 → robotframework-7.0}/src/robot/running/model.py +198 -337
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/namespace.py +124 -137
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/outputcapture.py +20 -12
- robotframework-7.0/src/robot/running/resourcemodel.py +448 -0
- {robotframework-6.1rc1 → 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.1rc1 → robotframework-7.0}/src/robot/testdoc.py +18 -13
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/__init__.py +53 -35
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/dotdict.py +3 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encodingsniffer.py +9 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/escaping.py +19 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/importer.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markupwriters.py +23 -15
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/misc.py +1 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0/src/robot/utils/notset.py +33 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotio.py +9 -9
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottime.py +122 -90
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robottypes.py +21 -31
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/text.py +7 -4
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/scopes.py +17 -12
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/search.py +66 -41
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/store.py +14 -16
- robotframework-7.0/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/version.py +1 -1
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/PKG-INFO +6 -8
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/SOURCES.txt +10 -8
- {robotframework-6.1rc1 → robotframework-7.0}/tasks.py +6 -6
- robotframework-6.1rc1/src/robot/htmldata/rebot/common.css +0 -239
- 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/output/xmllogger.py +0 -354
- robotframework-6.1rc1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1rc1/src/robot/result/keywordremover.py +0 -183
- robotframework-6.1rc1/src/robot/result/model.py +0 -957
- robotframework-6.1rc1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1rc1/src/robot/running/arguments/argumentresolver.py +0 -131
- robotframework-6.1rc1/src/robot/running/arguments/embedded.py +0 -146
- robotframework-6.1rc1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1rc1/src/robot/running/builder/transformers.py +0 -642
- robotframework-6.1rc1/src/robot/running/handlers.py +0 -321
- robotframework-6.1rc1/src/robot/running/handlerstore.py +0 -66
- robotframework-6.1rc1/src/robot/running/librarykeywordrunner.py +0 -238
- robotframework-6.1rc1/src/robot/running/libraryscopes.py +0 -97
- robotframework-6.1rc1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1rc1/src/robot/running/suiterunner.py +0 -249
- robotframework-6.1rc1/src/robot/running/testlibraries.py +0 -420
- robotframework-6.1rc1/src/robot/running/usererrorhandler.py +0 -75
- robotframework-6.1rc1/src/robot/running/userkeyword.py +0 -111
- robotframework-6.1rc1/src/robot/running/userkeywordrunner.py +0 -274
- robotframework-6.1rc1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1rc1 → robotframework-7.0}/AUTHORS.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/BUILD.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/COPYRIGHT.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/LICENSE.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/MANIFEST.in +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/setup.cfg +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/__main__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/errors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdoc.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/status.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/application.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/error.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/match.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1rc1 → robotframework-7.0}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -1,957 +0,0 @@
|
|
|
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
|
-
"""Module implementing result related model objects.
|
|
17
|
-
|
|
18
|
-
During test execution these objects are created internally by various runners.
|
|
19
|
-
At that time they can be inspected and modified by listeners__.
|
|
20
|
-
|
|
21
|
-
When results are parsed from XML output files after execution to be able to
|
|
22
|
-
create logs and reports, these objects are created by the
|
|
23
|
-
:func:`~.resultbuilder.ExecutionResult` factory method.
|
|
24
|
-
At that point they can be inspected and modified by `pre-Rebot modifiers`__.
|
|
25
|
-
|
|
26
|
-
The :func:`~.resultbuilder.ExecutionResult` factory method can also be used
|
|
27
|
-
by custom scripts and tools. In such usage it is often easiest to inspect and
|
|
28
|
-
modify these objects using the :mod:`visitor interface <robot.model.visitor>`.
|
|
29
|
-
|
|
30
|
-
If classes defined here are needed, for example, as type hints, they can
|
|
31
|
-
be imported via the :mod:`robot.running` module.
|
|
32
|
-
|
|
33
|
-
__ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#listener-interface
|
|
34
|
-
__ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#programmatic-modification-of-results
|
|
35
|
-
|
|
36
|
-
"""
|
|
37
|
-
|
|
38
|
-
import sys
|
|
39
|
-
import warnings
|
|
40
|
-
from collections import OrderedDict
|
|
41
|
-
from datetime import datetime, timedelta
|
|
42
|
-
from itertools import chain
|
|
43
|
-
from pathlib import Path
|
|
44
|
-
from typing import Generic, Mapping, Sequence, Type, Union, TypeVar
|
|
45
|
-
|
|
46
|
-
if sys.version_info >= (3, 8):
|
|
47
|
-
from typing import Literal
|
|
48
|
-
|
|
49
|
-
from robot import model
|
|
50
|
-
from robot.model import (BodyItem, create_fixture, DataDict, Keywords, Tags,
|
|
51
|
-
SuiteVisitor, TotalStatistics, TotalStatisticsBuilder,
|
|
52
|
-
TestCases, TestSuites)
|
|
53
|
-
from robot.utils import copy_signature, get_elapsed_time, KnownAtRuntime, setter
|
|
54
|
-
|
|
55
|
-
from .configurer import SuiteConfigurer
|
|
56
|
-
from .messagefilter import MessageFilter
|
|
57
|
-
from .modeldeprecation import deprecated, DeprecatedAttributesMixin
|
|
58
|
-
from .keywordremover import KeywordRemover
|
|
59
|
-
from .suiteteardownfailed import SuiteTeardownFailed, SuiteTeardownFailureHandler
|
|
60
|
-
|
|
61
|
-
IT = TypeVar('IT', bound='IfBranch|TryBranch')
|
|
62
|
-
FW = TypeVar('FW', bound='ForIteration|WhileIteration')
|
|
63
|
-
|
|
64
|
-
BodyItemParent = Union['TestSuite', 'TestCase', 'For', 'ForIteration', 'If', 'IfBranch',
|
|
65
|
-
'Try', 'TryBranch', 'While', 'WhileIteration', None]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class Body(model.BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Return', 'Continue',
|
|
69
|
-
'Break', 'Message', 'Error']):
|
|
70
|
-
__slots__ = []
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class Branches(model.BaseBranches['Keyword', 'For', 'While', 'If', 'Try', 'Return',
|
|
74
|
-
'Continue', 'Break', 'Message', 'Error', IT]):
|
|
75
|
-
__slots__ = []
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
class IterationType(Generic[FW]):
|
|
79
|
-
"""Class that wrapps `Generic` as python doesn't allow multple generic inheritance"""
|
|
80
|
-
pass
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class Iterations(model.BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Return',
|
|
84
|
-
'Continue', 'Break', 'Message', 'Error'], IterationType[FW]):
|
|
85
|
-
__slots__ = ['iteration_class']
|
|
86
|
-
iteration_type: Type[FW] = KnownAtRuntime
|
|
87
|
-
|
|
88
|
-
def __init__(self, iteration_class: Type[FW],
|
|
89
|
-
parent: BodyItemParent = None,
|
|
90
|
-
items: 'Sequence[FW|DataDict]' = ()):
|
|
91
|
-
self.iteration_class = iteration_class
|
|
92
|
-
super().__init__(parent, items)
|
|
93
|
-
|
|
94
|
-
@copy_signature(iteration_type)
|
|
95
|
-
def create_iteration(self, *args, **kwargs) -> FW:
|
|
96
|
-
return self._create(self.iteration_class, 'iteration_class', args, kwargs)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@Body.register
|
|
100
|
-
@Branches.register
|
|
101
|
-
@Iterations.register
|
|
102
|
-
class Message(model.Message):
|
|
103
|
-
__slots__ = ()
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class StatusMixin:
|
|
107
|
-
PASS = 'PASS'
|
|
108
|
-
FAIL = 'FAIL'
|
|
109
|
-
SKIP = 'SKIP'
|
|
110
|
-
NOT_RUN = 'NOT RUN'
|
|
111
|
-
NOT_SET = 'NOT SET'
|
|
112
|
-
starttime: 'str|None'
|
|
113
|
-
endtime: 'str|None'
|
|
114
|
-
__slots__ = ()
|
|
115
|
-
|
|
116
|
-
@property
|
|
117
|
-
def elapsedtime(self) -> int:
|
|
118
|
-
"""Total execution time in milliseconds.
|
|
119
|
-
|
|
120
|
-
This attribute will be replaced by :attr:`elapsed_time` in the future.
|
|
121
|
-
"""
|
|
122
|
-
return get_elapsed_time(self.starttime, self.endtime)
|
|
123
|
-
|
|
124
|
-
@property
|
|
125
|
-
def elapsed_time(self) -> timedelta:
|
|
126
|
-
"""Total execution time as a ``timedelta``.
|
|
127
|
-
|
|
128
|
-
This attribute will replace :attr:`elapsedtime` in the future.
|
|
129
|
-
|
|
130
|
-
New in Robot Framework 6.1.
|
|
131
|
-
"""
|
|
132
|
-
return timedelta(milliseconds=self.elapsedtime)
|
|
133
|
-
|
|
134
|
-
@property
|
|
135
|
-
def start_time(self) -> 'datetime|None':
|
|
136
|
-
"""Execution start time as a ``datetime`` or as ``None`` if not set.
|
|
137
|
-
|
|
138
|
-
This attribute will replace :attr:`starttime` in the future.
|
|
139
|
-
|
|
140
|
-
New in Robot Framework 6.1.
|
|
141
|
-
"""
|
|
142
|
-
return self._timestr_to_datetime(self.starttime) if self.starttime else None
|
|
143
|
-
|
|
144
|
-
@start_time.setter
|
|
145
|
-
def start_time(self, start_time: 'datetime|None'):
|
|
146
|
-
self.starttime = self._datetime_to_timestr(start_time) if start_time else None
|
|
147
|
-
|
|
148
|
-
@property
|
|
149
|
-
def end_time(self) -> 'datetime|None':
|
|
150
|
-
"""Execution end time as a ``datetime`` or as ``None`` if not set.
|
|
151
|
-
|
|
152
|
-
This attribute will replace :attr:`endtime` in the future.
|
|
153
|
-
|
|
154
|
-
New in Robot Framework 6.1.
|
|
155
|
-
"""
|
|
156
|
-
return self._timestr_to_datetime(self.endtime) if self.endtime else None
|
|
157
|
-
|
|
158
|
-
@end_time.setter
|
|
159
|
-
def end_time(self, end_time: 'datetime|None'):
|
|
160
|
-
self.endtime = self._datetime_to_timestr(end_time) if end_time else None
|
|
161
|
-
|
|
162
|
-
def _timestr_to_datetime(self, ts: str) -> datetime:
|
|
163
|
-
micro = int(ts[18:]) * 1000
|
|
164
|
-
return datetime(int(ts[:4]), int(ts[4:6]), int(ts[6:8]),
|
|
165
|
-
int(ts[9:11]), int(ts[12:14]), int(ts[15:17]), micro)
|
|
166
|
-
|
|
167
|
-
def _datetime_to_timestr(self, dt: datetime) -> str:
|
|
168
|
-
millis = int(round(dt.microsecond, -3) / 1000)
|
|
169
|
-
return (f'{dt.year}{dt.month:02}{dt.day:02} '
|
|
170
|
-
f'{dt.hour:02}:{dt.minute:02}.{dt.second:02}.{millis}')
|
|
171
|
-
|
|
172
|
-
@property
|
|
173
|
-
def passed(self) -> bool:
|
|
174
|
-
"""``True`` when :attr:`status` is 'PASS', ``False`` otherwise."""
|
|
175
|
-
return self.status == self.PASS
|
|
176
|
-
|
|
177
|
-
@passed.setter
|
|
178
|
-
def passed(self, passed: bool):
|
|
179
|
-
self.status = self.PASS if passed else self.FAIL
|
|
180
|
-
|
|
181
|
-
@property
|
|
182
|
-
def failed(self) -> bool:
|
|
183
|
-
"""``True`` when :attr:`status` is 'FAIL', ``False`` otherwise."""
|
|
184
|
-
return self.status == self.FAIL
|
|
185
|
-
|
|
186
|
-
@failed.setter
|
|
187
|
-
def failed(self, failed: bool):
|
|
188
|
-
self.status = self.FAIL if failed else self.PASS
|
|
189
|
-
|
|
190
|
-
@property
|
|
191
|
-
def skipped(self) -> bool:
|
|
192
|
-
"""``True`` when :attr:`status` is 'SKIP', ``False`` otherwise.
|
|
193
|
-
|
|
194
|
-
Setting to ``False`` value is ambiguous and raises an exception.
|
|
195
|
-
"""
|
|
196
|
-
return self.status == self.SKIP
|
|
197
|
-
|
|
198
|
-
@skipped.setter
|
|
199
|
-
def skipped(self, skipped: 'Literal[True]'):
|
|
200
|
-
if not skipped:
|
|
201
|
-
raise ValueError(f"`skipped` value must be truthy, got '{skipped}'.")
|
|
202
|
-
self.status = self.SKIP
|
|
203
|
-
|
|
204
|
-
@property
|
|
205
|
-
def not_run(self) -> bool:
|
|
206
|
-
"""``True`` when :attr:`status` is 'NOT RUN', ``False`` otherwise.
|
|
207
|
-
|
|
208
|
-
Setting to ``False`` value is ambiguous and raises an exception.
|
|
209
|
-
"""
|
|
210
|
-
return self.status == self.NOT_RUN
|
|
211
|
-
|
|
212
|
-
@not_run.setter
|
|
213
|
-
def not_run(self, not_run: 'Literal[True]'):
|
|
214
|
-
if not not_run:
|
|
215
|
-
raise ValueError(f"`not_run` value must be truthy, got '{not_run}'.")
|
|
216
|
-
self.status = self.NOT_RUN
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
class ForIteration(BodyItem, StatusMixin, DeprecatedAttributesMixin):
|
|
220
|
-
"""Represents one FOR loop iteration."""
|
|
221
|
-
type = BodyItem.ITERATION
|
|
222
|
-
body_class = Body
|
|
223
|
-
repr_args = ('variables',)
|
|
224
|
-
__slots__ = ['variables', 'status', 'starttime', 'endtime', 'doc']
|
|
225
|
-
|
|
226
|
-
def __init__(self, variables: 'Mapping[str, str]|None' = None,
|
|
227
|
-
status: str = 'FAIL',
|
|
228
|
-
starttime: 'str|None' = None,
|
|
229
|
-
endtime: 'str|None' = None,
|
|
230
|
-
doc: str = '',
|
|
231
|
-
parent: BodyItemParent = None):
|
|
232
|
-
self.variables = OrderedDict(variables or ())
|
|
233
|
-
self.parent = parent
|
|
234
|
-
self.status = status
|
|
235
|
-
self.starttime = starttime
|
|
236
|
-
self.endtime = endtime
|
|
237
|
-
self.doc = doc
|
|
238
|
-
self.body = []
|
|
239
|
-
|
|
240
|
-
@setter
|
|
241
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
242
|
-
return self.body_class(self, body)
|
|
243
|
-
|
|
244
|
-
def visit(self, visitor: SuiteVisitor):
|
|
245
|
-
visitor.visit_for_iteration(self)
|
|
246
|
-
|
|
247
|
-
@property
|
|
248
|
-
@deprecated
|
|
249
|
-
def name(self) -> str:
|
|
250
|
-
return ', '.join('%s = %s' % item for item in self.variables.items())
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
@Body.register
|
|
254
|
-
class For(model.For, StatusMixin, DeprecatedAttributesMixin):
|
|
255
|
-
iteration_class = ForIteration
|
|
256
|
-
iterations_class = Iterations[iteration_class]
|
|
257
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
258
|
-
|
|
259
|
-
def __init__(self, variables: Sequence[str] = (),
|
|
260
|
-
flavor: "Literal['IN', 'IN RANGE', 'IN ENUMERATE', 'IN ZIP']" = 'IN',
|
|
261
|
-
values: Sequence[str] = (),
|
|
262
|
-
start: 'str|None' = None,
|
|
263
|
-
mode: 'str|None' = None,
|
|
264
|
-
fill: 'str|None' = None,
|
|
265
|
-
status: str = 'FAIL',
|
|
266
|
-
starttime: 'str|None' = None,
|
|
267
|
-
endtime: 'str|None' = None,
|
|
268
|
-
doc: str = '',
|
|
269
|
-
parent: BodyItemParent = None):
|
|
270
|
-
super().__init__(variables, flavor, values, start, mode, fill, parent)
|
|
271
|
-
self.status = status
|
|
272
|
-
self.starttime = starttime
|
|
273
|
-
self.endtime = endtime
|
|
274
|
-
self.doc = doc
|
|
275
|
-
|
|
276
|
-
@setter
|
|
277
|
-
def body(self, iterations: 'Sequence[ForIteration|DataDict]') -> iterations_class:
|
|
278
|
-
return self.iterations_class(self.iteration_class, self, iterations)
|
|
279
|
-
|
|
280
|
-
@property
|
|
281
|
-
@deprecated
|
|
282
|
-
def name(self) -> str:
|
|
283
|
-
variables = ' | '.join(self.variables)
|
|
284
|
-
values = ' | '.join(self.values)
|
|
285
|
-
for name, value in [('start', self.start),
|
|
286
|
-
('mode', self.mode),
|
|
287
|
-
('fill', self.fill)]:
|
|
288
|
-
if value is not None:
|
|
289
|
-
values += f' | {name}={value}'
|
|
290
|
-
return f'{variables} {self.flavor} [ {values} ]'
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
class WhileIteration(BodyItem, StatusMixin, DeprecatedAttributesMixin):
|
|
294
|
-
"""Represents one WHILE loop iteration."""
|
|
295
|
-
type = BodyItem.ITERATION
|
|
296
|
-
body_class = Body
|
|
297
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
298
|
-
|
|
299
|
-
def __init__(self, status: str = 'FAIL',
|
|
300
|
-
starttime: 'str|None' = None,
|
|
301
|
-
endtime: 'str|None' = None,
|
|
302
|
-
doc: str = '',
|
|
303
|
-
parent: BodyItemParent = None):
|
|
304
|
-
self.parent = parent
|
|
305
|
-
self.status = status
|
|
306
|
-
self.starttime = starttime
|
|
307
|
-
self.endtime = endtime
|
|
308
|
-
self.doc = doc
|
|
309
|
-
self.body = ()
|
|
310
|
-
|
|
311
|
-
@setter
|
|
312
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
313
|
-
return self.body_class(self, body)
|
|
314
|
-
|
|
315
|
-
def visit(self, visitor: SuiteVisitor):
|
|
316
|
-
visitor.visit_while_iteration(self)
|
|
317
|
-
|
|
318
|
-
@property
|
|
319
|
-
@deprecated
|
|
320
|
-
def name(self) -> str:
|
|
321
|
-
return ''
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
@Body.register
|
|
325
|
-
class While(model.While, StatusMixin, DeprecatedAttributesMixin):
|
|
326
|
-
iteration_class = WhileIteration
|
|
327
|
-
iterations_class = Iterations[iteration_class]
|
|
328
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
329
|
-
|
|
330
|
-
def __init__(self, condition: 'str|None' = None,
|
|
331
|
-
limit: 'str|None' = None,
|
|
332
|
-
on_limit: 'str|None' = None,
|
|
333
|
-
on_limit_message: 'str|None' = None,
|
|
334
|
-
status: str = 'FAIL',
|
|
335
|
-
starttime: 'str|None' = None,
|
|
336
|
-
endtime: 'str|None' = None,
|
|
337
|
-
doc: str = '',
|
|
338
|
-
parent: BodyItemParent = None):
|
|
339
|
-
super().__init__(condition, limit, on_limit, on_limit_message, parent)
|
|
340
|
-
self.status = status
|
|
341
|
-
self.starttime = starttime
|
|
342
|
-
self.endtime = endtime
|
|
343
|
-
self.doc = doc
|
|
344
|
-
|
|
345
|
-
@setter
|
|
346
|
-
def body(self, iterations: 'Sequence[WhileIteration|DataDict]') -> iterations_class:
|
|
347
|
-
return self.iterations_class(self.iteration_class, self, iterations)
|
|
348
|
-
|
|
349
|
-
@property
|
|
350
|
-
@deprecated
|
|
351
|
-
def name(self) -> str:
|
|
352
|
-
parts = []
|
|
353
|
-
if self.condition:
|
|
354
|
-
parts.append(self.condition)
|
|
355
|
-
if self.limit:
|
|
356
|
-
parts.append(f'limit={self.limit}')
|
|
357
|
-
if self.on_limit:
|
|
358
|
-
parts.append(f'on_limit={self.on_limit}')
|
|
359
|
-
if self.on_limit_message:
|
|
360
|
-
parts.append(f'on_limit_message={self.on_limit_message}')
|
|
361
|
-
return ' | '.join(parts)
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
class IfBranch(model.IfBranch, StatusMixin, DeprecatedAttributesMixin):
|
|
365
|
-
body_class = Body
|
|
366
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
367
|
-
|
|
368
|
-
def __init__(self, type: str = BodyItem.IF,
|
|
369
|
-
condition: 'str|None' = None,
|
|
370
|
-
status: str = 'FAIL',
|
|
371
|
-
starttime: 'str|None' = None,
|
|
372
|
-
endtime: 'str|None' = None,
|
|
373
|
-
doc: str = '',
|
|
374
|
-
parent: BodyItemParent = None):
|
|
375
|
-
super().__init__(type, condition, parent)
|
|
376
|
-
self.status = status
|
|
377
|
-
self.starttime = starttime
|
|
378
|
-
self.endtime = endtime
|
|
379
|
-
self.doc = doc
|
|
380
|
-
|
|
381
|
-
@property
|
|
382
|
-
@deprecated
|
|
383
|
-
def name(self) -> str:
|
|
384
|
-
return self.condition or ''
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
@Body.register
|
|
388
|
-
class If(model.If, StatusMixin, DeprecatedAttributesMixin):
|
|
389
|
-
branch_class = IfBranch
|
|
390
|
-
branches_class = Branches[branch_class]
|
|
391
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
392
|
-
|
|
393
|
-
def __init__(self, status: str = 'FAIL',
|
|
394
|
-
starttime: 'str|None' = None,
|
|
395
|
-
endtime: 'str|None' = None,
|
|
396
|
-
doc: str = '',
|
|
397
|
-
parent: BodyItemParent = None):
|
|
398
|
-
super().__init__(parent)
|
|
399
|
-
self.status = status
|
|
400
|
-
self.starttime = starttime
|
|
401
|
-
self.endtime = endtime
|
|
402
|
-
self.doc = doc
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
class TryBranch(model.TryBranch, StatusMixin, DeprecatedAttributesMixin):
|
|
406
|
-
body_class = Body
|
|
407
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
408
|
-
|
|
409
|
-
def __init__(self, type: str = BodyItem.TRY,
|
|
410
|
-
patterns: Sequence[str] = (),
|
|
411
|
-
pattern_type: 'str|None' = None,
|
|
412
|
-
variable: 'str|None' = None,
|
|
413
|
-
status: str = 'FAIL',
|
|
414
|
-
starttime: 'str|None' = None,
|
|
415
|
-
endtime: 'str|None' = None,
|
|
416
|
-
doc: str = '',
|
|
417
|
-
parent: BodyItemParent = None):
|
|
418
|
-
super().__init__(type, patterns, pattern_type, variable, parent)
|
|
419
|
-
self.status = status
|
|
420
|
-
self.starttime = starttime
|
|
421
|
-
self.endtime = endtime
|
|
422
|
-
self.doc = doc
|
|
423
|
-
|
|
424
|
-
@property
|
|
425
|
-
@deprecated
|
|
426
|
-
def name(self) -> str:
|
|
427
|
-
patterns = list(self.patterns)
|
|
428
|
-
if self.pattern_type:
|
|
429
|
-
patterns.append(f'type={self.pattern_type}')
|
|
430
|
-
parts = []
|
|
431
|
-
if patterns:
|
|
432
|
-
parts.append(' | '.join(patterns))
|
|
433
|
-
if self.variable:
|
|
434
|
-
parts.append(f'AS {self.variable}')
|
|
435
|
-
return ' '.join(parts)
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
@Body.register
|
|
439
|
-
class Try(model.Try, StatusMixin, DeprecatedAttributesMixin):
|
|
440
|
-
branch_class = TryBranch
|
|
441
|
-
branches_class = Branches[branch_class]
|
|
442
|
-
__slots__ = ['status', 'starttime', 'endtime', 'doc']
|
|
443
|
-
|
|
444
|
-
def __init__(self, status: str = 'FAIL',
|
|
445
|
-
starttime: 'str|None' = None,
|
|
446
|
-
endtime: 'str|None' = None,
|
|
447
|
-
doc: str = '',
|
|
448
|
-
parent: BodyItemParent = None):
|
|
449
|
-
super().__init__(parent)
|
|
450
|
-
self.status = status
|
|
451
|
-
self.starttime = starttime
|
|
452
|
-
self.endtime = endtime
|
|
453
|
-
self.doc = doc
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
@Body.register
|
|
457
|
-
class Return(model.Return, StatusMixin, DeprecatedAttributesMixin):
|
|
458
|
-
__slots__ = ['status', 'starttime', 'endtime']
|
|
459
|
-
body_class = Body
|
|
460
|
-
|
|
461
|
-
def __init__(self, values: Sequence[str] = (),
|
|
462
|
-
status: str = 'FAIL',
|
|
463
|
-
starttime: 'str|None' = None,
|
|
464
|
-
endtime: 'str|None' = None,
|
|
465
|
-
parent: BodyItemParent = None):
|
|
466
|
-
super().__init__(values, parent)
|
|
467
|
-
self.status = status
|
|
468
|
-
self.starttime = starttime
|
|
469
|
-
self.endtime = endtime
|
|
470
|
-
self.body = ()
|
|
471
|
-
|
|
472
|
-
@setter
|
|
473
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
474
|
-
"""Child keywords and messages as a :class:`~.Body` object.
|
|
475
|
-
|
|
476
|
-
Typically empty. Only contains something if running RETURN has failed
|
|
477
|
-
due to a syntax error or listeners have logged messages or executed
|
|
478
|
-
keywords.
|
|
479
|
-
"""
|
|
480
|
-
return self.body_class(self, body)
|
|
481
|
-
|
|
482
|
-
@property
|
|
483
|
-
@deprecated
|
|
484
|
-
def args(self) -> 'tuple[str, ...]':
|
|
485
|
-
return self.values
|
|
486
|
-
|
|
487
|
-
@property
|
|
488
|
-
@deprecated
|
|
489
|
-
def doc(self) -> str:
|
|
490
|
-
return ''
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
@Body.register
|
|
494
|
-
class Continue(model.Continue, StatusMixin, DeprecatedAttributesMixin):
|
|
495
|
-
__slots__ = ['status', 'starttime', 'endtime']
|
|
496
|
-
body_class = Body
|
|
497
|
-
|
|
498
|
-
def __init__(self, status: str = 'FAIL',
|
|
499
|
-
starttime: 'str|None' = None,
|
|
500
|
-
endtime: 'str|None' = None,
|
|
501
|
-
parent: BodyItemParent = None):
|
|
502
|
-
super().__init__(parent)
|
|
503
|
-
self.status = status
|
|
504
|
-
self.starttime = starttime
|
|
505
|
-
self.endtime = endtime
|
|
506
|
-
self.body = ()
|
|
507
|
-
|
|
508
|
-
@setter
|
|
509
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
510
|
-
"""Child keywords and messages as a :class:`~.Body` object.
|
|
511
|
-
|
|
512
|
-
Typically empty. Only contains something if running CONTINUE has failed
|
|
513
|
-
due to a syntax error or listeners have logged messages or executed
|
|
514
|
-
keywords.
|
|
515
|
-
"""
|
|
516
|
-
return self.body_class(self, body)
|
|
517
|
-
|
|
518
|
-
@property
|
|
519
|
-
@deprecated
|
|
520
|
-
def args(self) -> 'tuple[str, ...]':
|
|
521
|
-
return ()
|
|
522
|
-
|
|
523
|
-
@property
|
|
524
|
-
@deprecated
|
|
525
|
-
def doc(self) -> str:
|
|
526
|
-
return ''
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
@Body.register
|
|
530
|
-
class Break(model.Break, StatusMixin, DeprecatedAttributesMixin):
|
|
531
|
-
__slots__ = ['status', 'starttime', 'endtime']
|
|
532
|
-
body_class = Body
|
|
533
|
-
|
|
534
|
-
def __init__(self, status: str = 'FAIL',
|
|
535
|
-
starttime: 'str|None' = None,
|
|
536
|
-
endtime: 'str|None' = None,
|
|
537
|
-
parent: BodyItemParent = None):
|
|
538
|
-
super().__init__(parent)
|
|
539
|
-
self.status = status
|
|
540
|
-
self.starttime = starttime
|
|
541
|
-
self.endtime = endtime
|
|
542
|
-
self.body = ()
|
|
543
|
-
|
|
544
|
-
@setter
|
|
545
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
546
|
-
"""Child keywords and messages as a :class:`~.Body` object.
|
|
547
|
-
|
|
548
|
-
Typically empty. Only contains something if running BREAK has failed
|
|
549
|
-
due to a syntax error or listeners have logged messages or executed
|
|
550
|
-
keywords.
|
|
551
|
-
"""
|
|
552
|
-
return self.body_class(self, body)
|
|
553
|
-
|
|
554
|
-
@property
|
|
555
|
-
@deprecated
|
|
556
|
-
def args(self) -> 'tuple[str, ...]':
|
|
557
|
-
return ()
|
|
558
|
-
|
|
559
|
-
@property
|
|
560
|
-
@deprecated
|
|
561
|
-
def doc(self) -> str:
|
|
562
|
-
return ''
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
@Body.register
|
|
566
|
-
class Error(model.Error, StatusMixin, DeprecatedAttributesMixin):
|
|
567
|
-
__slots__ = ['status', 'starttime', 'endtime']
|
|
568
|
-
body_class = Body
|
|
569
|
-
|
|
570
|
-
def __init__(self, values: Sequence[str] = (),
|
|
571
|
-
status: str = 'FAIL',
|
|
572
|
-
starttime: 'str|None' = None,
|
|
573
|
-
endtime: 'str|None' = None,
|
|
574
|
-
parent: BodyItemParent = None):
|
|
575
|
-
super().__init__(values, parent)
|
|
576
|
-
self.status = status
|
|
577
|
-
self.starttime = starttime
|
|
578
|
-
self.endtime = endtime
|
|
579
|
-
self.body = ()
|
|
580
|
-
|
|
581
|
-
@setter
|
|
582
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
583
|
-
"""Messages as a :class:`~.Body` object.
|
|
584
|
-
|
|
585
|
-
Typically contains the message that caused the error.
|
|
586
|
-
"""
|
|
587
|
-
return self.body_class(self, body)
|
|
588
|
-
|
|
589
|
-
@property
|
|
590
|
-
@deprecated
|
|
591
|
-
def kwname(self) -> str:
|
|
592
|
-
return self.values[0]
|
|
593
|
-
|
|
594
|
-
@property
|
|
595
|
-
@deprecated
|
|
596
|
-
def args(self) -> 'tuple[str, ...]':
|
|
597
|
-
return self.values[1:]
|
|
598
|
-
|
|
599
|
-
@property
|
|
600
|
-
@deprecated
|
|
601
|
-
def doc(self) -> 'str':
|
|
602
|
-
return ''
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
@Body.register
|
|
606
|
-
@Branches.register
|
|
607
|
-
@Iterations.register
|
|
608
|
-
class Keyword(model.Keyword, StatusMixin):
|
|
609
|
-
"""Represents an executed library or user keyword."""
|
|
610
|
-
body_class = Body
|
|
611
|
-
__slots__ = ['kwname', 'libname', 'doc', 'timeout', 'status', '_teardown',
|
|
612
|
-
'starttime', 'endtime', 'message', 'sourcename']
|
|
613
|
-
|
|
614
|
-
def __init__(self, kwname: str = '',
|
|
615
|
-
libname: str = '',
|
|
616
|
-
doc: str = '',
|
|
617
|
-
args: Sequence[str] = (),
|
|
618
|
-
assign: Sequence[str] = (),
|
|
619
|
-
tags: Sequence[str] = (),
|
|
620
|
-
timeout: 'str|None' = None,
|
|
621
|
-
type: str = BodyItem.KEYWORD,
|
|
622
|
-
status: str = 'FAIL',
|
|
623
|
-
starttime: 'str|None' = None,
|
|
624
|
-
endtime: 'str|None' = None,
|
|
625
|
-
sourcename: 'str|None' = None,
|
|
626
|
-
parent: BodyItemParent = None):
|
|
627
|
-
super().__init__(None, args, assign, type, parent)
|
|
628
|
-
#: Name of the keyword without library or resource name.
|
|
629
|
-
self.kwname = kwname
|
|
630
|
-
#: Name of the library or resource containing this keyword.
|
|
631
|
-
self.libname = libname
|
|
632
|
-
self.doc = doc
|
|
633
|
-
self.tags = tags
|
|
634
|
-
self.timeout = timeout
|
|
635
|
-
self.status = status
|
|
636
|
-
self.starttime = starttime
|
|
637
|
-
self.endtime = endtime
|
|
638
|
-
#: Keyword status message. Used only if suite teardowns fails.
|
|
639
|
-
self.message = ''
|
|
640
|
-
#: Original name of keyword with embedded arguments.
|
|
641
|
-
self.sourcename = sourcename
|
|
642
|
-
self._teardown = None
|
|
643
|
-
self.body = ()
|
|
644
|
-
|
|
645
|
-
@setter
|
|
646
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
647
|
-
"""Possible keyword body as a :class:`~.Body` object.
|
|
648
|
-
|
|
649
|
-
Body can consist of child keywords, messages, and control structures
|
|
650
|
-
such as IF/ELSE. Library keywords typically have an empty body.
|
|
651
|
-
"""
|
|
652
|
-
return self.body_class(self, body)
|
|
653
|
-
|
|
654
|
-
@property
|
|
655
|
-
def keywords(self) -> Keywords:
|
|
656
|
-
"""Deprecated since Robot Framework 4.0.
|
|
657
|
-
|
|
658
|
-
Use :attr:`body` or :attr:`teardown` instead.
|
|
659
|
-
"""
|
|
660
|
-
keywords = self.body.filter(messages=False)
|
|
661
|
-
if self.teardown:
|
|
662
|
-
keywords.append(self.teardown)
|
|
663
|
-
return Keywords(self, keywords)
|
|
664
|
-
|
|
665
|
-
@keywords.setter
|
|
666
|
-
def keywords(self, keywords):
|
|
667
|
-
Keywords.raise_deprecation_error()
|
|
668
|
-
|
|
669
|
-
@property
|
|
670
|
-
def messages(self) -> 'list[Message]':
|
|
671
|
-
"""Keyword's messages.
|
|
672
|
-
|
|
673
|
-
Starting from Robot Framework 4.0 this is a list generated from messages
|
|
674
|
-
in :attr:`body`.
|
|
675
|
-
"""
|
|
676
|
-
return self.body.filter(messages=True) # type: ignore
|
|
677
|
-
|
|
678
|
-
@property
|
|
679
|
-
def children(self) -> 'list[BodyItem]':
|
|
680
|
-
"""List of child keywords and messages in creation order.
|
|
681
|
-
|
|
682
|
-
Deprecated since Robot Framework 4.0. Use :attr:`body` instead.
|
|
683
|
-
"""
|
|
684
|
-
warnings.warn("'Keyword.children' is deprecated. Use 'Keyword.body' instead.")
|
|
685
|
-
return list(self.body)
|
|
686
|
-
|
|
687
|
-
@property
|
|
688
|
-
def name(self) -> 'str|None':
|
|
689
|
-
"""Keyword name in format ``libname.kwname``.
|
|
690
|
-
|
|
691
|
-
Just ``kwname`` if :attr:`libname` is empty. In practice that is the
|
|
692
|
-
case only with user keywords in the same file as the executed test case
|
|
693
|
-
or test suite.
|
|
694
|
-
|
|
695
|
-
Cannot be set directly. Set :attr:`libname` and :attr:`kwname`
|
|
696
|
-
separately instead.
|
|
697
|
-
"""
|
|
698
|
-
if not self.libname:
|
|
699
|
-
return self.kwname
|
|
700
|
-
return f'{self.libname}.{self.kwname}'
|
|
701
|
-
|
|
702
|
-
@name.setter
|
|
703
|
-
def name(self, name):
|
|
704
|
-
if name is not None:
|
|
705
|
-
raise AttributeError("Cannot set 'name' attribute directly. "
|
|
706
|
-
"Set 'kwname' and 'libname' separately instead.")
|
|
707
|
-
self.kwname = None
|
|
708
|
-
self.libname = None
|
|
709
|
-
|
|
710
|
-
@property # Cannot use @setter because it would create teardowns recursively.
|
|
711
|
-
def teardown(self) -> 'Keyword':
|
|
712
|
-
"""Keyword teardown as a :class:`Keyword` object.
|
|
713
|
-
|
|
714
|
-
Teardown can be modified by setting attributes directly::
|
|
715
|
-
|
|
716
|
-
keyword.teardown.name = 'Example'
|
|
717
|
-
keyword.teardown.args = ('First', 'Second')
|
|
718
|
-
|
|
719
|
-
Alternatively the :meth:`config` method can be used to set multiple
|
|
720
|
-
attributes in one call::
|
|
721
|
-
|
|
722
|
-
keyword.teardown.config(name='Example', args=('First', 'Second'))
|
|
723
|
-
|
|
724
|
-
The easiest way to reset the whole teardown is setting it to ``None``.
|
|
725
|
-
It will automatically recreate the underlying ``Keyword`` object::
|
|
726
|
-
|
|
727
|
-
keyword.teardown = None
|
|
728
|
-
|
|
729
|
-
This attribute is a ``Keyword`` object also when a keyword has no teardown
|
|
730
|
-
but in that case its truth value is ``False``. If there is a need to just
|
|
731
|
-
check does a keyword have a teardown, using the :attr:`has_teardown`
|
|
732
|
-
attribute avoids creating the ``Keyword`` object and is thus more memory
|
|
733
|
-
efficient.
|
|
734
|
-
|
|
735
|
-
New in Robot Framework 4.0. Earlier teardown was accessed like
|
|
736
|
-
``keyword.keywords.teardown``. :attr:`has_teardown` is new in Robot
|
|
737
|
-
Framework 4.1.2.
|
|
738
|
-
"""
|
|
739
|
-
if self._teardown is None:
|
|
740
|
-
self._teardown = create_fixture(self.__class__, None, self, self.TEARDOWN)
|
|
741
|
-
return self._teardown
|
|
742
|
-
|
|
743
|
-
@teardown.setter
|
|
744
|
-
def teardown(self, teardown: 'Keyword|DataDict|None'):
|
|
745
|
-
self._teardown = create_fixture(self.__class__, teardown, self, self.TEARDOWN)
|
|
746
|
-
|
|
747
|
-
@property
|
|
748
|
-
def has_teardown(self) -> bool:
|
|
749
|
-
"""Check does a keyword have a teardown without creating a teardown object.
|
|
750
|
-
|
|
751
|
-
A difference between using ``if kw.has_teardown:`` and ``if kw.teardown:``
|
|
752
|
-
is that accessing the :attr:`teardown` attribute creates a :class:`Keyword`
|
|
753
|
-
object representing a teardown even when the keyword actually does not
|
|
754
|
-
have one. This typically does not matter, but with bigger suite structures
|
|
755
|
-
having lots of keywords it can have a considerable effect on memory usage.
|
|
756
|
-
|
|
757
|
-
New in Robot Framework 4.1.2.
|
|
758
|
-
"""
|
|
759
|
-
return bool(self._teardown)
|
|
760
|
-
|
|
761
|
-
@setter
|
|
762
|
-
def tags(self, tags: Sequence[str]) -> model.Tags:
|
|
763
|
-
"""Keyword tags as a :class:`~.model.tags.Tags` object."""
|
|
764
|
-
return Tags(tags)
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
class TestCase(model.TestCase[Keyword], StatusMixin):
|
|
768
|
-
"""Represents results of a single test case.
|
|
769
|
-
|
|
770
|
-
See the base class for documentation of attributes not documented here.
|
|
771
|
-
"""
|
|
772
|
-
__slots__ = ['status', 'message', 'starttime', 'endtime']
|
|
773
|
-
body_class = Body
|
|
774
|
-
fixture_class = Keyword
|
|
775
|
-
|
|
776
|
-
def __init__(self, name: str = '',
|
|
777
|
-
doc: str = '',
|
|
778
|
-
tags: Sequence[str] = (),
|
|
779
|
-
timeout: 'str|None' = None,
|
|
780
|
-
lineno: 'int|None' = None,
|
|
781
|
-
status: str = 'FAIL',
|
|
782
|
-
message: str = '',
|
|
783
|
-
starttime: 'str|None' = None,
|
|
784
|
-
endtime: 'str|None' = None,
|
|
785
|
-
parent: 'TestSuite|None' = None):
|
|
786
|
-
super().__init__(name, doc, tags, timeout, lineno, parent)
|
|
787
|
-
#: Status as a string ``PASS`` or ``FAIL``. See also :attr:`passed`.
|
|
788
|
-
self.status = status
|
|
789
|
-
#: Test message. Typically a failure message but can be set also when
|
|
790
|
-
#: test passes.
|
|
791
|
-
self.message = message
|
|
792
|
-
#: Test case execution start time in format ``%Y%m%d %H:%M:%S.%f``.
|
|
793
|
-
self.starttime = starttime
|
|
794
|
-
#: Test case execution end time in format ``%Y%m%d %H:%M:%S.%f``.
|
|
795
|
-
self.endtime = endtime
|
|
796
|
-
|
|
797
|
-
@property
|
|
798
|
-
def not_run(self) -> bool:
|
|
799
|
-
return False
|
|
800
|
-
|
|
801
|
-
@property
|
|
802
|
-
def critical(self) -> bool:
|
|
803
|
-
warnings.warn("'TestCase.critical' is deprecated and always returns 'True'.")
|
|
804
|
-
return True
|
|
805
|
-
|
|
806
|
-
@setter
|
|
807
|
-
def body(self, body: 'Sequence[BodyItem|DataDict]') -> Body:
|
|
808
|
-
"""Test body as a :class:`~robot.result.Body` object."""
|
|
809
|
-
return self.body_class(self, body)
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
class TestSuite(model.TestSuite[Keyword, TestCase], StatusMixin):
|
|
813
|
-
"""Represents results of a single test suite.
|
|
814
|
-
|
|
815
|
-
See the base class for documentation of attributes not documented here.
|
|
816
|
-
"""
|
|
817
|
-
__slots__ = ['message', 'starttime', 'endtime']
|
|
818
|
-
test_class = TestCase
|
|
819
|
-
fixture_class = Keyword
|
|
820
|
-
|
|
821
|
-
def __init__(self, name: str = '',
|
|
822
|
-
doc: str = '',
|
|
823
|
-
metadata: 'Mapping[str, str]|None' = None,
|
|
824
|
-
source: 'Path|str|None' = None,
|
|
825
|
-
rpa: bool = False,
|
|
826
|
-
message: str = '',
|
|
827
|
-
starttime: 'str|None' = None,
|
|
828
|
-
endtime: 'str|None' = None,
|
|
829
|
-
parent: 'TestSuite|None' = None):
|
|
830
|
-
super().__init__(name, doc, metadata, source, rpa, parent)
|
|
831
|
-
#: Possible suite setup or teardown error message.
|
|
832
|
-
self.message = message
|
|
833
|
-
#: Suite execution start time in format ``%Y%m%d %H:%M:%S.%f``.
|
|
834
|
-
self.starttime = starttime
|
|
835
|
-
#: Suite execution end time in format ``%Y%m%d %H:%M:%S.%f``.
|
|
836
|
-
self.endtime = endtime
|
|
837
|
-
|
|
838
|
-
@property
|
|
839
|
-
def passed(self) -> bool:
|
|
840
|
-
"""``True`` if no test has failed but some have passed, ``False`` otherwise."""
|
|
841
|
-
return self.status == self.PASS
|
|
842
|
-
|
|
843
|
-
@property
|
|
844
|
-
def failed(self) -> bool:
|
|
845
|
-
"""``True`` if any test has failed, ``False`` otherwise."""
|
|
846
|
-
return self.status == self.FAIL
|
|
847
|
-
|
|
848
|
-
@property
|
|
849
|
-
def skipped(self) -> bool:
|
|
850
|
-
"""``True`` if there are no passed or failed tests, ``False`` otherwise."""
|
|
851
|
-
return self.status == self.SKIP
|
|
852
|
-
|
|
853
|
-
@property
|
|
854
|
-
def not_run(self) -> bool:
|
|
855
|
-
return False
|
|
856
|
-
|
|
857
|
-
@property
|
|
858
|
-
def status(self) -> "Literal['PASS', 'SKIP', 'FAIL']":
|
|
859
|
-
"""'PASS', 'FAIL' or 'SKIP' depending on test statuses.
|
|
860
|
-
|
|
861
|
-
- If any test has failed, status is 'FAIL'.
|
|
862
|
-
- If no test has failed but at least some test has passed, status is 'PASS'.
|
|
863
|
-
- If there are no failed or passed tests, status is 'SKIP'. This covers both
|
|
864
|
-
the case when all tests have been skipped and when there are no tests.
|
|
865
|
-
"""
|
|
866
|
-
stats = self.statistics # Local variable avoids recreating stats.
|
|
867
|
-
if stats.failed:
|
|
868
|
-
return self.FAIL
|
|
869
|
-
if stats.passed:
|
|
870
|
-
return self.PASS
|
|
871
|
-
return self.SKIP
|
|
872
|
-
|
|
873
|
-
@property
|
|
874
|
-
def statistics(self) -> TotalStatistics:
|
|
875
|
-
"""Suite statistics as a :class:`~robot.model.totalstatistics.TotalStatistics` object.
|
|
876
|
-
|
|
877
|
-
Recreated every time this property is accessed, so saving the results
|
|
878
|
-
to a variable and inspecting it is often a good idea::
|
|
879
|
-
|
|
880
|
-
stats = suite.statistics
|
|
881
|
-
print(stats.failed)
|
|
882
|
-
print(stats.total)
|
|
883
|
-
print(stats.message)
|
|
884
|
-
"""
|
|
885
|
-
return TotalStatisticsBuilder(self, bool(self.rpa)).stats
|
|
886
|
-
|
|
887
|
-
@property
|
|
888
|
-
def full_message(self) -> str:
|
|
889
|
-
"""Combination of :attr:`message` and :attr:`stat_message`."""
|
|
890
|
-
if not self.message:
|
|
891
|
-
return self.stat_message
|
|
892
|
-
return f'{self.message}\n\n{self.stat_message}'
|
|
893
|
-
|
|
894
|
-
@property
|
|
895
|
-
def stat_message(self) -> str:
|
|
896
|
-
"""String representation of the :attr:`statistics`."""
|
|
897
|
-
return self.statistics.message
|
|
898
|
-
|
|
899
|
-
@property
|
|
900
|
-
def elapsedtime(self) -> int:
|
|
901
|
-
"""Total execution time in milliseconds."""
|
|
902
|
-
if self.starttime and self.endtime:
|
|
903
|
-
return get_elapsed_time(self.starttime, self.endtime)
|
|
904
|
-
return sum(child.elapsedtime for child in
|
|
905
|
-
chain(self.suites, self.tests, (self.setup, self.teardown)))
|
|
906
|
-
|
|
907
|
-
@setter
|
|
908
|
-
def suites(self, suites: 'Sequence[TestSuite|DataDict]') -> TestSuites['TestSuite']:
|
|
909
|
-
return TestSuites['TestSuite'](self.__class__, self, suites)
|
|
910
|
-
|
|
911
|
-
def remove_keywords(self, how: str):
|
|
912
|
-
"""Remove keywords based on the given condition.
|
|
913
|
-
|
|
914
|
-
:param how: What approach to use when removing keywords. Either
|
|
915
|
-
``ALL``, ``PASSED``, ``FOR``, ``WUKS``, or ``NAME:<pattern>``.
|
|
916
|
-
|
|
917
|
-
For more information about the possible values see the documentation
|
|
918
|
-
of the ``--removekeywords`` command line option.
|
|
919
|
-
"""
|
|
920
|
-
self.visit(KeywordRemover(how))
|
|
921
|
-
|
|
922
|
-
def filter_messages(self, log_level: str = 'TRACE'):
|
|
923
|
-
"""Remove log messages below the specified ``log_level``."""
|
|
924
|
-
self.visit(MessageFilter(log_level))
|
|
925
|
-
|
|
926
|
-
def configure(self, **options):
|
|
927
|
-
"""A shortcut to configure a suite using one method call.
|
|
928
|
-
|
|
929
|
-
Can only be used with the root test suite.
|
|
930
|
-
|
|
931
|
-
:param options: Passed to
|
|
932
|
-
:class:`~robot.result.configurer.SuiteConfigurer` that will then
|
|
933
|
-
set suite attributes, call :meth:`filter`, etc. as needed.
|
|
934
|
-
|
|
935
|
-
Example::
|
|
936
|
-
|
|
937
|
-
suite.configure(remove_keywords='PASSED',
|
|
938
|
-
doc='Smoke test results.')
|
|
939
|
-
|
|
940
|
-
Not to be confused with :meth:`config` method that suites, tests,
|
|
941
|
-
and keywords have to make it possible to set multiple attributes in
|
|
942
|
-
one call.
|
|
943
|
-
"""
|
|
944
|
-
super().configure() # Parent validates is call allowed.
|
|
945
|
-
self.visit(SuiteConfigurer(**options))
|
|
946
|
-
|
|
947
|
-
def handle_suite_teardown_failures(self):
|
|
948
|
-
"""Internal usage only."""
|
|
949
|
-
self.visit(SuiteTeardownFailureHandler())
|
|
950
|
-
|
|
951
|
-
def suite_teardown_failed(self, message: str):
|
|
952
|
-
"""Internal usage only."""
|
|
953
|
-
self.visit(SuiteTeardownFailed(message))
|
|
954
|
-
|
|
955
|
-
def suite_teardown_skipped(self, message: str):
|
|
956
|
-
"""Internal usage only."""
|
|
957
|
-
self.visit(SuiteTeardownFailed(message, skipped=True))
|