robotframework 6.1.1__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.1.1/src/robotframework.egg-info → robotframework-7.0a1}/PKG-INFO +3 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/setup.py +2 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/interfaces.py +35 -48
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/parsing.py +4 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/gatherfailed.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/languages.py +0 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/settings.py +8 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.css +4 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.html +9 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/model.js +2 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/testdata.js +10 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/template.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/builder.py +0 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/datatypes.py +9 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlutils.py +4 -7
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonbuilder.py +14 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/model.py +13 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/robotbuilder.py +13 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlbuilder.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/xmlwriter.py +12 -38
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/BuiltIn.py +215 -189
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Collections.py +2 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/DateTime.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/OperatingSystem.py +4 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Process.py +26 -27
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Remote.py +40 -36
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/String.py +4 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/XML.py +7 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/__init__.py +4 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/body.py +14 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/configurer.py +15 -11
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/control.py +151 -81
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/filter.py +31 -25
- robotframework-7.0a1/src/robot/model/keyword.py +70 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/message.py +19 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/namepatterns.py +3 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/stats.py +9 -15
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tags.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testcase.py +12 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/testsuite.py +16 -22
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/visitor.py +35 -8
- robotframework-7.0a1/src/robot/output/console/dotted.py +90 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/quiet.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/verbose.py +60 -60
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/debugfile.py +36 -23
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/filelogger.py +16 -13
- robotframework-7.0a1/src/robot/output/listeners.py +586 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/logger.py +164 -77
- robotframework-7.0a1/src/robot/output/loggerapi.py +152 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/loggerhelper.py +23 -56
- robotframework-7.0a1/src/robot/output/output.py +158 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/stdoutlogsplitter.py +8 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/xmllogger.py +163 -109
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/blocklexers.py +17 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/context.py +12 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/lexer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/settings.py +6 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/statementlexers.py +39 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokens.py +27 -29
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/blocks.py +19 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/statements.py +184 -84
- robotframework-7.0a1/src/robot/parsing/model/visitor.py +102 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/expandkeywordmatcher.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsbuildingcontext.py +8 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsmodelbuilders.py +88 -61
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/stringcache.py +4 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/xunitwriter.py +15 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/__init__.py +3 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/configurer.py +12 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/flattenkeywordmatcher.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/keywordremover.py +71 -54
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/merger.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/model.py +400 -316
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/modeldeprecation.py +9 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/resultbuilder.py +21 -23
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/xmlelementhandlers.py +76 -40
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/__init__.py +1 -1
- robotframework-7.0a1/src/robot/running/arguments/argumentconverter.py +101 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentmapper.py +16 -14
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentresolver.py +41 -33
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentspec.py +24 -90
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentvalidator.py +34 -27
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/customconverters.py +14 -11
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/embedded.py +23 -26
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/typeconverters.py +175 -213
- robotframework-7.0a1/src/robot/running/arguments/typeinfo.py +367 -0
- robotframework-7.0a1/src/robot/running/arguments/typevalidator.py +62 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/bodyrunner.py +83 -68
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/parsers.py +8 -10
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/settings.py +9 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/transformers.py +166 -308
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/context.py +80 -25
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlers.py +11 -16
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/handlerstore.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/librarykeywordrunner.py +9 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/model.py +109 -32
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/namespace.py +18 -19
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/statusreporter.py +13 -12
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/suiterunner.py +15 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/testlibraries.py +33 -40
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/usererrorhandler.py +8 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeyword.py +13 -8
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/userkeywordrunner.py +18 -21
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/testdoc.py +18 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/__init__.py +50 -35
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/connectioncache.py +64 -59
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encodingsniffer.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/escaping.py +11 -9
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markupwriters.py +20 -13
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/normalizing.py +9 -24
- robotframework-7.0a1/src/robot/utils/notset.py +33 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/platform.py +15 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotpath.py +1 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottime.py +120 -88
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robottypes.py +16 -31
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/setter.py +0 -5
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/text.py +7 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/unic.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/__init__.py +2 -2
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/assigner.py +17 -19
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/evaluation.py +20 -17
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/filesetter.py +80 -80
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/replacer.py +33 -36
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/scopes.py +3 -3
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/search.py +66 -41
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/store.py +14 -16
- robotframework-7.0a1/src/robot/variables/tablesetter.py +164 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/variables.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/version.py +1 -1
- {robotframework-6.1.1 → robotframework-7.0a1/src/robotframework.egg-info}/PKG-INFO +3 -6
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/SOURCES.txt +3 -4
- {robotframework-6.1.1 → robotframework-7.0a1}/tasks.py +6 -6
- robotframework-6.1.1/src/robot/libraries/Reserved.py +0 -48
- robotframework-6.1.1/src/robot/model/keyword.py +0 -173
- robotframework-6.1.1/src/robot/output/console/dotted.py +0 -90
- robotframework-6.1.1/src/robot/output/listenerarguments.py +0 -165
- robotframework-6.1.1/src/robot/output/listenermethods.py +0 -113
- robotframework-6.1.1/src/robot/output/listeners.py +0 -174
- robotframework-6.1.1/src/robot/output/output.py +0 -95
- robotframework-6.1.1/src/robot/parsing/model/visitor.py +0 -67
- robotframework-6.1.1/src/robot/running/arguments/argumentconverter.py +0 -79
- robotframework-6.1.1/src/robot/running/arguments/typevalidator.py +0 -56
- robotframework-6.1.1/src/robot/running/modelcombiner.py +0 -32
- robotframework-6.1.1/src/robot/variables/tablesetter.py +0 -156
- {robotframework-6.1.1 → robotframework-7.0a1}/AUTHORS.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/BUILD.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/CONTRIBUTING.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/COPYRIGHT.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/INSTALL.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/LICENSE.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/MANIFEST.in +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/README.rst +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/setup.cfg +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/__main__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/deco.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/exceptions.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/api/logger.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/conf/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/errors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/js_disabled.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/common/storage.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/htmlfilewriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.highlight.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tablesorter.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jquery.tmpl.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/lib/jsxcompressor.min.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/doc_formatting.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/libdoc.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/libdoc/pygments.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/common.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/doc_formatting.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/fileloading.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/log.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/print.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/report.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/util.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/rebot/view.js +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.css +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/htmldata/testdoc/testdoc.html +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdoc.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/consoleviewer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/htmlwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/jsonwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/output.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/standardtypes.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libdocpkg/writer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Dialogs.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Easter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Screenshot.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/Telnet.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/libraries/dialogs_py.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/fixture.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/itemlist.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/metadata.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modelobject.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/modifier.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/statistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/suitestatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/tagstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/model/totalstatistics.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/console/highlighting.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/librarylogger.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/output/pyloggingconf.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/lexer/tokenizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/model/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/blockparsers.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/fileparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/parser/parser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/parsing/suitestructure.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/pythonpathsetter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/rebot.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jsexecutionresult.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/jswriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/logreportwriters.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/outputwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/reporting/resultwriter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionerrors.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/executionresult.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/messagefilter.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/suiteteardownfailed.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/result/visitor.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/run.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/arguments/argumentparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/builder/builders.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/dynamicmethods.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/importer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/libraryscopes.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/outputcapture.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/randomizer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/runkwregister.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/signalhandler.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/status.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/__init__.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/posix.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/running/timeouts/windows.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/application.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/argumentparser.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/asserts.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/charwidth.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/compress.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/dotdict.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/encoding.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/error.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/etreewrapper.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/filereader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/frange.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/htmlformatters.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/importer.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/markuputils.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/match.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/misc.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/recommendations.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/restreader.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotenv.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotinspect.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/robotio.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/sortable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/utils/typehints.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/finders.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/notfound.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robot/variables/resolvable.py +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/dependency_links.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/entry_points.txt +0 -0
- {robotframework-6.1.1 → robotframework-7.0a1}/src/robotframework.egg-info/top_level.txt +0 -0
|
@@ -18,19 +18,12 @@ from ast import literal_eval
|
|
|
18
18
|
|
|
19
19
|
from robot.api import logger
|
|
20
20
|
from robot.utils import (get_error_message, is_dict_like, is_list_like, is_truthy,
|
|
21
|
-
Matcher, plural_or_not as s, seq2str, seq2str2,
|
|
21
|
+
Matcher, NOT_SET, plural_or_not as s, seq2str, seq2str2,
|
|
22
|
+
type_name)
|
|
22
23
|
from robot.utils.asserts import assert_equal
|
|
23
24
|
from robot.version import get_version
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
class NotSet:
|
|
27
|
-
def __repr__(self):
|
|
28
|
-
return ""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
NOT_SET = NotSet()
|
|
32
|
-
|
|
33
|
-
|
|
34
27
|
class _List:
|
|
35
28
|
|
|
36
29
|
def convert_to_list(self, item):
|
|
@@ -619,7 +619,7 @@ class Time:
|
|
|
619
619
|
return secs_to_timestr(seconds, compact=True)
|
|
620
620
|
|
|
621
621
|
def _convert_to_timer(self, seconds, millis=True):
|
|
622
|
-
return elapsed_time_to_string(seconds
|
|
622
|
+
return elapsed_time_to_string(seconds, include_millis=millis, seconds=True)
|
|
623
623
|
|
|
624
624
|
def _convert_to_timedelta(self, seconds, millis=True):
|
|
625
625
|
return timedelta(seconds=seconds)
|
|
@@ -21,6 +21,7 @@ import re
|
|
|
21
21
|
import shutil
|
|
22
22
|
import tempfile
|
|
23
23
|
import time
|
|
24
|
+
from datetime import datetime
|
|
24
25
|
|
|
25
26
|
from robot.version import get_version
|
|
26
27
|
from robot.api import logger
|
|
@@ -28,7 +29,7 @@ from robot.api.deco import keyword
|
|
|
28
29
|
from robot.utils import (abspath, ConnectionCache, console_decode, del_env_var,
|
|
29
30
|
get_env_var, get_env_vars, get_time, is_truthy,
|
|
30
31
|
is_string, normpath, parse_time, plural_or_not,
|
|
31
|
-
safe_str,
|
|
32
|
+
safe_str, secs_to_timestr, seq2str,
|
|
32
33
|
set_env_var, timestr_to_secs, CONSOLE_ENCODING, WINDOWS)
|
|
33
34
|
|
|
34
35
|
__version__ = get_version()
|
|
@@ -1297,8 +1298,8 @@ class OperatingSystem:
|
|
|
1297
1298
|
if not os.path.isfile(path):
|
|
1298
1299
|
self._error("Path '%s' is not a regular file." % path)
|
|
1299
1300
|
os.utime(path, (mtime, mtime))
|
|
1300
|
-
time.sleep(0.1)
|
|
1301
|
-
tstamp =
|
|
1301
|
+
time.sleep(0.1) # Give OS some time to really set these times.
|
|
1302
|
+
tstamp = datetime.fromtimestamp(mtime).isoformat(' ', timespec='seconds')
|
|
1302
1303
|
self._link("Set modified time of '%%s' to %s." % tstamp, path)
|
|
1303
1304
|
|
|
1304
1305
|
def get_file_size(self, path):
|
|
@@ -75,7 +75,7 @@ class Process:
|
|
|
75
75
|
optional ``**configuration`` keyword arguments. Configuration arguments
|
|
76
76
|
must be given after other arguments passed to these keywords and must
|
|
77
77
|
use syntax like ``name=value``. Available configuration arguments are
|
|
78
|
-
listed below and discussed further in sections
|
|
78
|
+
listed below and discussed further in sections afterward.
|
|
79
79
|
|
|
80
80
|
| = Name = | = Explanation = |
|
|
81
81
|
| shell | Specifies whether to run the command in shell or not. |
|
|
@@ -96,7 +96,7 @@ class Process:
|
|
|
96
96
|
== Running processes in shell ==
|
|
97
97
|
|
|
98
98
|
The ``shell`` argument specifies whether to run the process in a shell or
|
|
99
|
-
not. By default shell is not used, which means that shell specific commands,
|
|
99
|
+
not. By default, shell is not used, which means that shell specific commands,
|
|
100
100
|
like ``copy`` and ``dir`` on Windows, are not available. You can, however,
|
|
101
101
|
run shell scripts and batch files without using a shell.
|
|
102
102
|
|
|
@@ -129,8 +129,8 @@ class Process:
|
|
|
129
129
|
|
|
130
130
|
== Environment variables ==
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
The child process will get a copy of the parent process's environment
|
|
133
|
+
variables by default. The ``env`` argument can be used to give the
|
|
134
134
|
child a custom environment as a Python dictionary. If there is a need
|
|
135
135
|
to specify only certain environment variable, it is possible to use the
|
|
136
136
|
``env:<name>=<value>`` format to set or override only that named variables.
|
|
@@ -143,12 +143,12 @@ class Process:
|
|
|
143
143
|
|
|
144
144
|
== Standard output and error streams ==
|
|
145
145
|
|
|
146
|
-
By default processes are run so that their standard output and standard
|
|
146
|
+
By default, processes are run so that their standard output and standard
|
|
147
147
|
error streams are kept in the memory. This works fine normally,
|
|
148
148
|
but if there is a lot of output, the output buffers may get full and
|
|
149
149
|
the program can hang.
|
|
150
150
|
|
|
151
|
-
To avoid the above
|
|
151
|
+
To avoid the above-mentioned problems, it is possible to use ``stdout``
|
|
152
152
|
and ``stderr`` arguments to specify files on the file system where to
|
|
153
153
|
redirect the outputs. This can also be useful if other processes or
|
|
154
154
|
other keywords need to read or manipulate the outputs somehow.
|
|
@@ -172,8 +172,6 @@ class Process:
|
|
|
172
172
|
This way the process will not hang even if there would be a lot of output,
|
|
173
173
|
but naturally output is not available after execution either.
|
|
174
174
|
|
|
175
|
-
Support for the special value ``DEVNULL`` is new in Robot Framework 3.2.
|
|
176
|
-
|
|
177
175
|
Examples:
|
|
178
176
|
| ${result} = | `Run Process` | program | stdout=${TEMPDIR}/stdout.txt | stderr=${TEMPDIR}/stderr.txt |
|
|
179
177
|
| `Log Many` | stdout: ${result.stdout} | stderr: ${result.stderr} |
|
|
@@ -191,25 +189,23 @@ class Process:
|
|
|
191
189
|
explained in the table below.
|
|
192
190
|
|
|
193
191
|
| = Value = | = Explanation = |
|
|
194
|
-
| String ``
|
|
195
|
-
| String ``
|
|
192
|
+
| String ``NONE`` | Inherit stdin from the parent process. This is the default. |
|
|
193
|
+
| String ``PIPE`` | Make stdin a pipe that can be written to. |
|
|
196
194
|
| Path to a file | Open the specified file and use it as the stdin. |
|
|
197
195
|
| Any other string | Create a temporary file with the text as its content and use it as the stdin. |
|
|
198
196
|
| Any non-string value | Used as-is. Could be a file descriptor, stdout of another process, etc. |
|
|
199
197
|
|
|
200
|
-
Values ``PIPE`` and ``NONE`` are internally mapped
|
|
198
|
+
Values ``PIPE`` and ``NONE`` are case-insensitive and internally mapped to
|
|
201
199
|
``subprocess.PIPE`` and ``None``, respectively, when calling
|
|
202
200
|
[https://docs.python.org/3/library/subprocess.html#subprocess.Popen|subprocess.Popen].
|
|
203
|
-
The default behavior may change from ``PIPE`` to ``NONE`` in future
|
|
204
|
-
releases. If you depend on the ``PIPE`` behavior, it is a good idea to use
|
|
205
|
-
it explicitly.
|
|
206
201
|
|
|
207
202
|
Examples:
|
|
208
|
-
| `Run Process` | command | stdin=
|
|
203
|
+
| `Run Process` | command | stdin=PIPE |
|
|
209
204
|
| `Run Process` | command | stdin=${CURDIR}/stdin.txt |
|
|
210
205
|
| `Run Process` | command | stdin=Stdin as text. |
|
|
211
206
|
|
|
212
|
-
The support to configure ``stdin`` is new in Robot Framework 4.1.2.
|
|
207
|
+
The support to configure ``stdin`` is new in Robot Framework 4.1.2. Its default
|
|
208
|
+
value used to be ``PIPE`` until Robot Framework 7.0.
|
|
213
209
|
|
|
214
210
|
== Output encoding ==
|
|
215
211
|
|
|
@@ -298,8 +294,6 @@ class Process:
|
|
|
298
294
|
| `Terminate Process` | kill=${EMPTY} | # Empty string is false. |
|
|
299
295
|
| `Terminate Process` | kill=${FALSE} | # Python ``False`` is false. |
|
|
300
296
|
|
|
301
|
-
Considering ``OFF`` and ``0`` false is new in Robot Framework 3.1.
|
|
302
|
-
|
|
303
297
|
= Example =
|
|
304
298
|
|
|
305
299
|
| ***** Settings *****
|
|
@@ -337,9 +331,15 @@ class Process:
|
|
|
337
331
|
configuration` for more details about configuration related to starting
|
|
338
332
|
processes. Configuration related to waiting for processes consists of
|
|
339
333
|
``timeout`` and ``on_timeout`` arguments that have same semantics as
|
|
340
|
-
with `Wait For Process` keyword. By default there is no timeout, and
|
|
334
|
+
with `Wait For Process` keyword. By default, there is no timeout, and
|
|
341
335
|
if timeout is defined the default action on timeout is ``terminate``.
|
|
342
336
|
|
|
337
|
+
Process outputs are, by default, written into in-memory buffers.
|
|
338
|
+
If there is a lot of output, these buffers may get full causing
|
|
339
|
+
the process to hang. To avoid that, process outputs can be redirected
|
|
340
|
+
using the ``stdout`` and ``stderr`` configuration parameters. For more
|
|
341
|
+
information see the `Standard output and error streams` section.
|
|
342
|
+
|
|
343
343
|
Returns a `result object` containing information about the execution.
|
|
344
344
|
|
|
345
345
|
Note that possible equal signs in ``*arguments`` must be escaped
|
|
@@ -349,7 +349,7 @@ class Process:
|
|
|
349
349
|
Examples:
|
|
350
350
|
| ${result} = | Run Process | python | -c | print('Hello, world!') |
|
|
351
351
|
| Should Be Equal | ${result.stdout} | Hello, world! |
|
|
352
|
-
| ${result} = | Run Process | ${command} |
|
|
352
|
+
| ${result} = | Run Process | ${command} | stdout=${CURDIR}/stdout.txt | stderr=STDOUT |
|
|
353
353
|
| ${result} = | Run Process | ${command} | timeout=1min | on_timeout=continue |
|
|
354
354
|
| ${result} = | Run Process | java -Dname\\=value Example | shell=True | cwd=${EXAMPLE} |
|
|
355
355
|
|
|
@@ -369,11 +369,13 @@ class Process:
|
|
|
369
369
|
|
|
370
370
|
See `Specifying command and arguments` and `Process configuration`
|
|
371
371
|
for more information about the arguments, and `Run Process` keyword
|
|
372
|
-
for related examples.
|
|
372
|
+
for related examples. This includes information about redirecting
|
|
373
|
+
process outputs to avoid process handing due to output buffers getting
|
|
374
|
+
full.
|
|
373
375
|
|
|
374
376
|
Makes the started process new `active process`. Returns the created
|
|
375
377
|
[https://docs.python.org/3/library/subprocess.html#popen-constructor |
|
|
376
|
-
subprocess.Popen] object which can be
|
|
378
|
+
subprocess.Popen] object which can be used later to activate this
|
|
377
379
|
process. ``Popen`` attributes like ``pid`` can also be accessed directly.
|
|
378
380
|
|
|
379
381
|
Processes are started so that they create a new process group. This
|
|
@@ -381,7 +383,7 @@ class Process:
|
|
|
381
383
|
|
|
382
384
|
Examples:
|
|
383
385
|
|
|
384
|
-
Start process and wait for it to end later using alias:
|
|
386
|
+
Start process and wait for it to end later using an alias:
|
|
385
387
|
| `Start Process` | ${command} | alias=example |
|
|
386
388
|
| # Other keywords |
|
|
387
389
|
| ${result} = | `Wait For Process` | example |
|
|
@@ -492,9 +494,6 @@ class Process:
|
|
|
492
494
|
| ${result} = | Wait For Process | timeout=1min 30s | on_timeout=kill |
|
|
493
495
|
| Process Should Be Stopped | | |
|
|
494
496
|
| Should Be Equal As Integers | ${result.rc} | -9 |
|
|
495
|
-
|
|
496
|
-
Ignoring timeout if it is string ``NONE``, zero, or negative is new
|
|
497
|
-
in Robot Framework 3.2.
|
|
498
497
|
"""
|
|
499
498
|
process = self._processes[handle]
|
|
500
499
|
logger.info('Waiting for process to complete.')
|
|
@@ -882,7 +881,7 @@ class ExecutionResult:
|
|
|
882
881
|
|
|
883
882
|
class ProcessConfiguration:
|
|
884
883
|
|
|
885
|
-
def __init__(self, cwd=None, shell=False, stdout=None, stderr=None, stdin=
|
|
884
|
+
def __init__(self, cwd=None, shell=False, stdout=None, stderr=None, stdin=None,
|
|
886
885
|
output_encoding='CONSOLE', alias=None, env=None, **rest):
|
|
887
886
|
self.cwd = os.path.normpath(cwd) if cwd else os.path.abspath('.')
|
|
888
887
|
self.shell = is_truthy(shell)
|
|
@@ -20,6 +20,7 @@ import re
|
|
|
20
20
|
import socket
|
|
21
21
|
import sys
|
|
22
22
|
import xmlrpc.client
|
|
23
|
+
from datetime import date, datetime, timedelta
|
|
23
24
|
from xml.parsers.expat import ExpatError
|
|
24
25
|
|
|
25
26
|
from robot.errors import RemoteError
|
|
@@ -59,8 +60,8 @@ class Remote:
|
|
|
59
60
|
try:
|
|
60
61
|
return self._client.get_keyword_names()
|
|
61
62
|
except TypeError as error:
|
|
62
|
-
raise RuntimeError('Connecting remote server at
|
|
63
|
-
|
|
63
|
+
raise RuntimeError(f'Connecting remote server at {self._uri} '
|
|
64
|
+
f'failed: {error}')
|
|
64
65
|
|
|
65
66
|
def _is_lib_info_available(self):
|
|
66
67
|
if not self._lib_info_initialized:
|
|
@@ -107,47 +108,53 @@ class Remote:
|
|
|
107
108
|
|
|
108
109
|
class ArgumentCoercer:
|
|
109
110
|
binary = re.compile('[\x00-\x08\x0B\x0C\x0E-\x1F]')
|
|
110
|
-
non_ascii = re.compile('[\x80-\xff]')
|
|
111
111
|
|
|
112
112
|
def coerce(self, argument):
|
|
113
113
|
for handles, handler in [(is_string, self._handle_string),
|
|
114
|
-
(
|
|
115
|
-
(
|
|
114
|
+
(self._no_conversion_needed, self._pass_through),
|
|
115
|
+
(self._is_date, self._handle_date),
|
|
116
|
+
(self._is_timedelta, self._handle_timedelta),
|
|
116
117
|
(is_dict_like, self._coerce_dict),
|
|
117
|
-
(is_list_like, self._coerce_list)
|
|
118
|
-
(lambda arg: True, self._to_string)]:
|
|
118
|
+
(is_list_like, self._coerce_list)]:
|
|
119
119
|
if handles(argument):
|
|
120
120
|
return handler(argument)
|
|
121
|
+
return self._to_string(argument)
|
|
122
|
+
|
|
123
|
+
def _no_conversion_needed(self, arg):
|
|
124
|
+
return is_number(arg) or is_bytes(arg) or isinstance(arg, datetime)
|
|
121
125
|
|
|
122
126
|
def _handle_string(self, arg):
|
|
123
|
-
if self.
|
|
127
|
+
if self.binary.search(arg):
|
|
124
128
|
return self._handle_binary_in_string(arg)
|
|
125
129
|
return arg
|
|
126
130
|
|
|
127
|
-
def _string_contains_binary(self, arg):
|
|
128
|
-
return (self.binary.search(arg) or
|
|
129
|
-
is_bytes(arg) and self.non_ascii.search(arg))
|
|
130
|
-
|
|
131
131
|
def _handle_binary_in_string(self, arg):
|
|
132
132
|
try:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
arg = arg.encode('latin-1')
|
|
133
|
+
# Map Unicode code points to bytes directly
|
|
134
|
+
return arg.encode('latin-1')
|
|
136
135
|
except UnicodeError:
|
|
137
|
-
raise ValueError('Cannot represent
|
|
138
|
-
return xmlrpc.client.Binary(arg)
|
|
139
|
-
|
|
140
|
-
def _handle_bytes(self, arg):
|
|
141
|
-
return xmlrpc.client.Binary(arg)
|
|
136
|
+
raise ValueError(f'Cannot represent {arg!r} as binary.')
|
|
142
137
|
|
|
143
138
|
def _pass_through(self, arg):
|
|
144
139
|
return arg
|
|
145
140
|
|
|
141
|
+
def _is_date(self, arg):
|
|
142
|
+
return isinstance(arg, date)
|
|
143
|
+
|
|
144
|
+
def _handle_date(self, arg):
|
|
145
|
+
return datetime(arg.year, arg.month, arg.day)
|
|
146
|
+
|
|
147
|
+
def _is_timedelta(self, arg):
|
|
148
|
+
return isinstance(arg, timedelta)
|
|
149
|
+
|
|
150
|
+
def _handle_timedelta(self, arg):
|
|
151
|
+
return arg.total_seconds()
|
|
152
|
+
|
|
146
153
|
def _coerce_list(self, arg):
|
|
147
154
|
return [self.coerce(item) for item in arg]
|
|
148
155
|
|
|
149
156
|
def _coerce_dict(self, arg):
|
|
150
|
-
return
|
|
157
|
+
return {self._to_key(key): self.coerce(arg[key]) for key in arg}
|
|
151
158
|
|
|
152
159
|
def _to_key(self, item):
|
|
153
160
|
item = self._to_string(item)
|
|
@@ -159,15 +166,15 @@ class ArgumentCoercer:
|
|
|
159
166
|
return self._handle_string(item)
|
|
160
167
|
|
|
161
168
|
def _validate_key(self, key):
|
|
162
|
-
if isinstance(key,
|
|
163
|
-
raise ValueError('Dictionary keys cannot be binary. Got
|
|
169
|
+
if isinstance(key, bytes):
|
|
170
|
+
raise ValueError(f'Dictionary keys cannot be binary. Got {key!r}.')
|
|
164
171
|
|
|
165
172
|
|
|
166
173
|
class RemoteResult:
|
|
167
174
|
|
|
168
175
|
def __init__(self, result):
|
|
169
176
|
if not (is_dict_like(result) and 'status' in result):
|
|
170
|
-
raise RuntimeError('Invalid remote result dictionary:
|
|
177
|
+
raise RuntimeError(f'Invalid remote result dictionary: {result!r}')
|
|
171
178
|
self.status = result['status']
|
|
172
179
|
self.output = safe_str(self._get(result, 'output'))
|
|
173
180
|
self.return_ = self._get(result, 'return')
|
|
@@ -181,8 +188,6 @@ class RemoteResult:
|
|
|
181
188
|
return self._convert(value)
|
|
182
189
|
|
|
183
190
|
def _convert(self, value):
|
|
184
|
-
if isinstance(value, xmlrpc.client.Binary):
|
|
185
|
-
return bytes(value.data)
|
|
186
191
|
if is_dict_like(value):
|
|
187
192
|
return DotDict((k, self._convert(v)) for k, v in value.items())
|
|
188
193
|
if is_list_like(value):
|
|
@@ -204,6 +209,7 @@ class XmlRpcRemoteClient:
|
|
|
204
209
|
else:
|
|
205
210
|
transport = TimeoutHTTPTransport(timeout=self.timeout)
|
|
206
211
|
server = xmlrpc.client.ServerProxy(self.uri, encoding='UTF-8',
|
|
212
|
+
use_builtin_types=True,
|
|
207
213
|
transport=transport)
|
|
208
214
|
try:
|
|
209
215
|
yield server
|
|
@@ -244,12 +250,12 @@ class XmlRpcRemoteClient:
|
|
|
244
250
|
except xmlrpc.client.Fault as err:
|
|
245
251
|
message = err.faultString
|
|
246
252
|
except socket.error as err:
|
|
247
|
-
message = 'Connection to remote server broken:
|
|
253
|
+
message = f'Connection to remote server broken: {err}'
|
|
248
254
|
except ExpatError as err:
|
|
249
|
-
message = ('Processing XML-RPC return value failed. '
|
|
250
|
-
'Most often this happens when the return value '
|
|
251
|
-
'contains characters that are not valid in XML. '
|
|
252
|
-
'Original error was: ExpatError:
|
|
255
|
+
message = (f'Processing XML-RPC return value failed. '
|
|
256
|
+
f'Most often this happens when the return value '
|
|
257
|
+
f'contains characters that are not valid in XML. '
|
|
258
|
+
f'Original error was: ExpatError: {err}')
|
|
253
259
|
raise RuntimeError(message)
|
|
254
260
|
|
|
255
261
|
|
|
@@ -259,11 +265,9 @@ class XmlRpcRemoteClient:
|
|
|
259
265
|
class TimeoutHTTPTransport(xmlrpc.client.Transport):
|
|
260
266
|
_connection_class = http.client.HTTPConnection
|
|
261
267
|
|
|
262
|
-
def __init__(self,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
timeout = socket._GLOBAL_DEFAULT_TIMEOUT
|
|
266
|
-
self.timeout = timeout
|
|
268
|
+
def __init__(self, timeout=None):
|
|
269
|
+
super().__init__(use_builtin_types=True)
|
|
270
|
+
self.timeout = timeout or socket._GLOBAL_DEFAULT_TIMEOUT
|
|
267
271
|
|
|
268
272
|
def make_connection(self, host):
|
|
269
273
|
if self._connection and host == self._connection[0]:
|
|
@@ -293,8 +293,8 @@ class String:
|
|
|
293
293
|
if you need more complex pattern matching.
|
|
294
294
|
"""
|
|
295
295
|
if is_truthy(case_insensitive):
|
|
296
|
-
pattern = pattern.
|
|
297
|
-
contains = lambda line: pattern in line.
|
|
296
|
+
pattern = pattern.casefold()
|
|
297
|
+
contains = lambda line: pattern in line.casefold()
|
|
298
298
|
else:
|
|
299
299
|
contains = lambda line: pattern in line
|
|
300
300
|
return self._get_matching_lines(string, contains)
|
|
@@ -329,8 +329,8 @@ class String:
|
|
|
329
329
|
literal strings is enough.
|
|
330
330
|
"""
|
|
331
331
|
if is_truthy(case_insensitive):
|
|
332
|
-
pattern = pattern.
|
|
333
|
-
matches = lambda line: fnmatchcase(line.
|
|
332
|
+
pattern = pattern.casefold()
|
|
333
|
+
matches = lambda line: fnmatchcase(line.casefold(), pattern)
|
|
334
334
|
else:
|
|
335
335
|
matches = lambda line: fnmatchcase(line, pattern)
|
|
336
336
|
return self._get_matching_lines(string, matches)
|
|
@@ -34,8 +34,7 @@ else:
|
|
|
34
34
|
from robot.api import logger
|
|
35
35
|
from robot.api.deco import keyword
|
|
36
36
|
from robot.libraries.BuiltIn import BuiltIn
|
|
37
|
-
from robot.utils import
|
|
38
|
-
is_truthy, plural_or_not as s)
|
|
37
|
+
from robot.utils import asserts, ET, ETSource, is_falsy, is_truthy, plural_or_not as s
|
|
39
38
|
from robot.version import get_version
|
|
40
39
|
|
|
41
40
|
|
|
@@ -53,7 +52,7 @@ class XML:
|
|
|
53
52
|
The library has the following main usages:
|
|
54
53
|
|
|
55
54
|
- Parsing an XML file, or a string containing XML, into an XML element
|
|
56
|
-
structure and finding certain elements from it for
|
|
55
|
+
structure and finding certain elements from it for further analysis
|
|
57
56
|
(e.g. `Parse XML` and `Get Element` keywords).
|
|
58
57
|
- Getting text or attributes of elements
|
|
59
58
|
(e.g. `Get Element Text` and `Get Element Attribute`).
|
|
@@ -75,10 +74,10 @@ class XML:
|
|
|
75
74
|
children and their children. Possible comments and processing instructions
|
|
76
75
|
in the source XML are removed.
|
|
77
76
|
|
|
78
|
-
XML is not validated during parsing even if has a schema defined. How
|
|
77
|
+
XML is not validated during parsing even if it has a schema defined. How
|
|
79
78
|
possible doctype elements are handled otherwise depends on the used XML
|
|
80
79
|
module and on the platform. The standard ElementTree strips doctypes
|
|
81
|
-
altogether but when `using lxml` they are preserved when XML is saved.
|
|
80
|
+
altogether, but when `using lxml` they are preserved when XML is saved.
|
|
82
81
|
|
|
83
82
|
The element structure returned by `Parse XML`, as well as elements
|
|
84
83
|
returned by keywords such as `Get Element`, can be used as the ``source``
|
|
@@ -168,7 +167,7 @@ class XML:
|
|
|
168
167
|
|
|
169
168
|
If lxml support is enabled when `importing` the library, the whole
|
|
170
169
|
[http://www.w3.org/TR/xpath/|xpath 1.0 standard] is supported.
|
|
171
|
-
That includes everything listed below but also lot of other useful
|
|
170
|
+
That includes everything listed below but also a lot of other useful
|
|
172
171
|
constructs.
|
|
173
172
|
|
|
174
173
|
== Tag names ==
|
|
@@ -304,7 +303,7 @@ class XML:
|
|
|
304
303
|
= Handling XML namespaces =
|
|
305
304
|
|
|
306
305
|
ElementTree and lxml handle possible namespaces in XML documents by adding
|
|
307
|
-
the namespace URI to tag names in so
|
|
306
|
+
the namespace URI to tag names in so-called Clark Notation. That is
|
|
308
307
|
inconvenient especially with xpaths, and by default this library strips
|
|
309
308
|
those namespaces away and moves them to ``xmlns`` attribute instead. That
|
|
310
309
|
can be avoided by passing ``keep_clark_notation`` argument to `Parse XML`
|
|
@@ -1279,7 +1278,7 @@ class XML:
|
|
|
1279
1278
|
The element to copy is specified using ``source`` and ``xpath``. They
|
|
1280
1279
|
have exactly the same semantics as with `Get Element` keyword.
|
|
1281
1280
|
|
|
1282
|
-
If the copy or the original element is modified
|
|
1281
|
+
If the copy or the original element is modified afterward, the changes
|
|
1283
1282
|
have no effect on the other.
|
|
1284
1283
|
|
|
1285
1284
|
Examples using ``${XML}`` structure from `Example`:
|
|
@@ -27,5 +27,5 @@ the http://robotframework.org web site.
|
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
STDLIBS = frozenset(('BuiltIn', 'Collections', 'DateTime', 'Dialogs', 'Easter',
|
|
30
|
-
'OperatingSystem', 'Process', 'Remote', '
|
|
31
|
-
'
|
|
30
|
+
'OperatingSystem', 'Process', 'Remote', 'Screenshot',
|
|
31
|
+
'String', 'Telnet', 'XML'))
|
|
@@ -27,14 +27,14 @@ This package is considered stable.
|
|
|
27
27
|
|
|
28
28
|
from .body import BaseBody, Body, BodyItem, BaseBranches
|
|
29
29
|
from .configurer import SuiteConfigurer
|
|
30
|
-
from .control import Break, Continue, Error, For, If, IfBranch, Return, Try,
|
|
30
|
+
from .control import (Break, Continue, Error, For, If, IfBranch, Return, Try,
|
|
31
|
+
TryBranch, Var, While)
|
|
31
32
|
from .fixture import create_fixture
|
|
32
33
|
from .itemlist import ItemList
|
|
33
|
-
from .keyword import Keyword
|
|
34
|
-
from .message import Message, Messages
|
|
34
|
+
from .keyword import Keyword
|
|
35
|
+
from .message import Message, MessageLevel, Messages
|
|
35
36
|
from .modelobject import DataDict, ModelObject
|
|
36
37
|
from .modifier import ModelModifier
|
|
37
|
-
from .namepatterns import SuiteNamePatterns, TestNamePatterns
|
|
38
38
|
from .statistics import Statistics
|
|
39
39
|
from .tags import Tags, TagPattern, TagPatterns
|
|
40
40
|
from .testcase import TestCase, TestCases
|
|
@@ -26,7 +26,7 @@ if TYPE_CHECKING:
|
|
|
26
26
|
from robot.result.model import ForIteration, WhileIteration
|
|
27
27
|
from robot.running.model import UserKeyword, ResourceFile
|
|
28
28
|
from .control import (Break, Continue, Error, For, If, IfBranch, Return,
|
|
29
|
-
Try, TryBranch, While)
|
|
29
|
+
Try, TryBranch, Var, While)
|
|
30
30
|
from .keyword import Keyword
|
|
31
31
|
from .message import Message
|
|
32
32
|
from .testcase import TestCase
|
|
@@ -35,13 +35,14 @@ if TYPE_CHECKING:
|
|
|
35
35
|
|
|
36
36
|
BodyItemParent = Union['TestSuite', 'TestCase', 'UserKeyword', 'For', 'ForIteration',
|
|
37
37
|
'If', 'IfBranch', 'Try', 'TryBranch', 'While', 'WhileIteration',
|
|
38
|
-
'Keyword', 'Return', 'Continue', 'Break', 'Error', None]
|
|
38
|
+
'Keyword', 'Var', 'Return', 'Continue', 'Break', 'Error', None]
|
|
39
39
|
BI = TypeVar('BI', bound='BodyItem')
|
|
40
40
|
KW = TypeVar('KW', bound='Keyword')
|
|
41
41
|
F = TypeVar('F', bound='For')
|
|
42
42
|
W = TypeVar('W', bound='While')
|
|
43
43
|
I = TypeVar('I', bound='If')
|
|
44
44
|
T = TypeVar('T', bound='Try')
|
|
45
|
+
V = TypeVar('V', bound='Var')
|
|
45
46
|
R = TypeVar('R', bound='Return')
|
|
46
47
|
C = TypeVar('C', bound='Continue')
|
|
47
48
|
B = TypeVar('B', bound='Break')
|
|
@@ -65,11 +66,13 @@ class BodyItem(ModelObject):
|
|
|
65
66
|
EXCEPT = 'EXCEPT'
|
|
66
67
|
FINALLY = 'FINALLY'
|
|
67
68
|
WHILE = 'WHILE'
|
|
69
|
+
VAR = 'VAR'
|
|
68
70
|
RETURN = 'RETURN'
|
|
69
71
|
CONTINUE = 'CONTINUE'
|
|
70
72
|
BREAK = 'BREAK'
|
|
71
73
|
ERROR = 'ERROR'
|
|
72
74
|
MESSAGE = 'MESSAGE'
|
|
75
|
+
KEYWORD_TYPES = (KEYWORD, SETUP, TEARDOWN)
|
|
73
76
|
type = None
|
|
74
77
|
__slots__ = ['parent']
|
|
75
78
|
|
|
@@ -111,7 +114,7 @@ class BodyItem(ModelObject):
|
|
|
111
114
|
raise NotImplementedError
|
|
112
115
|
|
|
113
116
|
|
|
114
|
-
class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
|
|
117
|
+
class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, V, R, C, B, M, E]):
|
|
115
118
|
"""Base class for Body and Branches objects."""
|
|
116
119
|
__slots__ = []
|
|
117
120
|
# Set using 'BaseBody.register' when these classes are created.
|
|
@@ -120,6 +123,7 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
|
|
|
120
123
|
while_class: Type[W] = KnownAtRuntime
|
|
121
124
|
if_class: Type[I] = KnownAtRuntime
|
|
122
125
|
try_class: Type[T] = KnownAtRuntime
|
|
126
|
+
var_class: Type[V] = KnownAtRuntime
|
|
123
127
|
return_class: Type[R] = KnownAtRuntime
|
|
124
128
|
continue_class: Type[C] = KnownAtRuntime
|
|
125
129
|
break_class: Type[B] = KnownAtRuntime
|
|
@@ -185,6 +189,10 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
|
|
|
185
189
|
def create_while(self, *args, **kwargs) -> while_class:
|
|
186
190
|
return self._create(self.while_class, 'create_while', args, kwargs)
|
|
187
191
|
|
|
192
|
+
@copy_signature(var_class)
|
|
193
|
+
def create_var(self, *args, **kwargs) -> var_class:
|
|
194
|
+
return self._create(self.var_class, 'create_var', args, kwargs)
|
|
195
|
+
|
|
188
196
|
@copy_signature(return_class)
|
|
189
197
|
def create_return(self, *args, **kwargs) -> return_class:
|
|
190
198
|
return self._create(self.return_class, 'create_return', args, kwargs)
|
|
@@ -267,8 +275,8 @@ class BaseBody(ItemList[BodyItem], Generic[KW, F, W, I, T, R, C, B, M, E]):
|
|
|
267
275
|
return steps
|
|
268
276
|
|
|
269
277
|
|
|
270
|
-
class Body(BaseBody['Keyword', 'For', 'While', 'If', 'Try', '
|
|
271
|
-
'Break', 'Message', 'Error']):
|
|
278
|
+
class Body(BaseBody['Keyword', 'For', 'While', 'If', 'Try', 'Var', 'Return',
|
|
279
|
+
'Continue', 'Break', 'Message', 'Error']):
|
|
272
280
|
"""A list-like object representing a body of a test, keyword, etc.
|
|
273
281
|
|
|
274
282
|
Body contains the keywords and other structures such as FOR loops.
|
|
@@ -281,7 +289,7 @@ class BranchType(Generic[IT]):
|
|
|
281
289
|
pass
|
|
282
290
|
|
|
283
291
|
|
|
284
|
-
class BaseBranches(BaseBody[KW, F, W, I, T, R, C, B, M, E], BranchType[IT]):
|
|
292
|
+
class BaseBranches(BaseBody[KW, F, W, I, T, V, R, C, B, M, E], BranchType[IT]):
|
|
285
293
|
"""A list-like object representing IF and TRY branches."""
|
|
286
294
|
__slots__ = ['branch_class']
|
|
287
295
|
branch_type: Type[IT] = KnownAtRuntime
|
|
@@ -66,22 +66,26 @@ class SuiteConfigurer(SuiteVisitor):
|
|
|
66
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:
|