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
|
@@ -21,8 +21,7 @@ from string import ascii_lowercase, ascii_uppercase, digits
|
|
|
21
21
|
|
|
22
22
|
from robot.api import logger
|
|
23
23
|
from robot.api.deco import keyword
|
|
24
|
-
from robot.utils import
|
|
25
|
-
parse_re_flags, safe_str, type_name)
|
|
24
|
+
from robot.utils import FileReader, parse_re_flags, type_name
|
|
26
25
|
from robot.version import get_version
|
|
27
26
|
|
|
28
27
|
|
|
@@ -118,12 +117,10 @@ class String:
|
|
|
118
117
|
strings contain upper case letters or special characters like
|
|
119
118
|
apostrophes. It would, for example, convert "it's an OK iPhone"
|
|
120
119
|
to "It'S An Ok Iphone".
|
|
121
|
-
|
|
122
|
-
New in Robot Framework 3.2.
|
|
123
120
|
"""
|
|
124
|
-
if not
|
|
125
|
-
raise TypeError('This keyword works only with
|
|
126
|
-
if
|
|
121
|
+
if not isinstance(string, str):
|
|
122
|
+
raise TypeError('This keyword works only with strings.')
|
|
123
|
+
if isinstance(exclude, str):
|
|
127
124
|
exclude = [e.strip() for e in exclude.split(',')]
|
|
128
125
|
elif not exclude:
|
|
129
126
|
exclude = []
|
|
@@ -141,7 +138,7 @@ class String:
|
|
|
141
138
|
return ''.join(title(token) for token in tokens)
|
|
142
139
|
|
|
143
140
|
def encode_string_to_bytes(self, string, encoding, errors='strict'):
|
|
144
|
-
"""Encodes the given
|
|
141
|
+
"""Encodes the given ``string`` to bytes using the given ``encoding``.
|
|
145
142
|
|
|
146
143
|
``errors`` argument controls what to do if encoding some characters fails.
|
|
147
144
|
All values accepted by ``encode`` method in Python are valid, but in
|
|
@@ -158,13 +155,13 @@ class String:
|
|
|
158
155
|
|
|
159
156
|
Use `Convert To Bytes` in ``BuiltIn`` if you want to create bytes based
|
|
160
157
|
on character or integer sequences. Use `Decode Bytes To String` if you
|
|
161
|
-
need to convert
|
|
162
|
-
in ``BuiltIn`` if you need to convert arbitrary objects to
|
|
158
|
+
need to convert bytes to strings and `Convert To String`
|
|
159
|
+
in ``BuiltIn`` if you need to convert arbitrary objects to strings.
|
|
163
160
|
"""
|
|
164
161
|
return bytes(string.encode(encoding, errors))
|
|
165
162
|
|
|
166
163
|
def decode_bytes_to_string(self, bytes, encoding, errors='strict'):
|
|
167
|
-
"""Decodes the given ``bytes`` to a
|
|
164
|
+
"""Decodes the given ``bytes`` to a string using the given ``encoding``.
|
|
168
165
|
|
|
169
166
|
``errors`` argument controls what to do if decoding some bytes fails.
|
|
170
167
|
All values accepted by ``decode`` method in Python are valid, but in
|
|
@@ -179,11 +176,11 @@ class String:
|
|
|
179
176
|
| ${string} = | Decode Bytes To String | ${bytes} | UTF-8 |
|
|
180
177
|
| ${string} = | Decode Bytes To String | ${bytes} | ASCII | errors=ignore |
|
|
181
178
|
|
|
182
|
-
Use `Encode String To Bytes` if you need to convert
|
|
183
|
-
|
|
184
|
-
convert arbitrary objects to
|
|
179
|
+
Use `Encode String To Bytes` if you need to convert strings to bytes,
|
|
180
|
+
and `Convert To String` in ``BuiltIn`` if you need to
|
|
181
|
+
convert arbitrary objects to strings.
|
|
185
182
|
"""
|
|
186
|
-
if
|
|
183
|
+
if isinstance(bytes, str):
|
|
187
184
|
raise TypeError('Cannot decode strings.')
|
|
188
185
|
return bytes.decode(encoding, errors)
|
|
189
186
|
|
|
@@ -208,13 +205,11 @@ class String:
|
|
|
208
205
|
| ${xx} = | Format String | {:*^30} | centered |
|
|
209
206
|
| ${yy} = | Format String | {0:{width}{base}} | ${42} | base=X | width=10 |
|
|
210
207
|
| ${zz} = | Format String | ${CURDIR}/template.txt | positional | named=value |
|
|
211
|
-
|
|
212
|
-
New in Robot Framework 3.1.
|
|
213
208
|
"""
|
|
214
209
|
if os.path.isabs(template) and os.path.isfile(template):
|
|
215
210
|
template = template.replace('/', os.sep)
|
|
216
|
-
logger.info('Reading template from file
|
|
217
|
-
|
|
211
|
+
logger.info(f'Reading template from file '
|
|
212
|
+
f'<a href="{template}">{template}</a>.', html=True)
|
|
218
213
|
with FileReader(template) as reader:
|
|
219
214
|
template = reader.read()
|
|
220
215
|
return template.format(*positional, **named)
|
|
@@ -222,7 +217,7 @@ class String:
|
|
|
222
217
|
def get_line_count(self, string):
|
|
223
218
|
"""Returns and logs the number of lines in the given string."""
|
|
224
219
|
count = len(string.splitlines())
|
|
225
|
-
logger.info('
|
|
220
|
+
logger.info(f'{count} lines.')
|
|
226
221
|
return count
|
|
227
222
|
|
|
228
223
|
def split_to_lines(self, string, start=0, end=None):
|
|
@@ -255,7 +250,7 @@ class String:
|
|
|
255
250
|
def get_line(self, string, line_number):
|
|
256
251
|
"""Returns the specified line from the given ``string``.
|
|
257
252
|
|
|
258
|
-
Line numbering starts from 0 and it is possible to use
|
|
253
|
+
Line numbering starts from 0, and it is possible to use
|
|
259
254
|
negative indices to refer to lines from the end. The line is
|
|
260
255
|
returned without the newline character.
|
|
261
256
|
|
|
@@ -268,38 +263,43 @@ class String:
|
|
|
268
263
|
line_number = self._convert_to_integer(line_number, 'line_number')
|
|
269
264
|
return string.splitlines()[line_number]
|
|
270
265
|
|
|
271
|
-
def get_lines_containing_string(self, string, pattern,
|
|
266
|
+
def get_lines_containing_string(self, string: str, pattern: str,
|
|
267
|
+
case_insensitive: 'bool|None' = None,
|
|
268
|
+
ignore_case: bool = False):
|
|
272
269
|
"""Returns lines of the given ``string`` that contain the ``pattern``.
|
|
273
270
|
|
|
274
271
|
The ``pattern`` is always considered to be a normal string, not a glob
|
|
275
272
|
or regexp pattern. A line matches if the ``pattern`` is found anywhere
|
|
276
273
|
on it.
|
|
277
274
|
|
|
278
|
-
The match is case-sensitive by default, but
|
|
279
|
-
a true value
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
in Python.
|
|
275
|
+
The match is case-sensitive by default, but that can be changed by
|
|
276
|
+
giving ``ignore_case`` a true value. This option is new in Robot
|
|
277
|
+
Framework 7.0, but with older versions it is possible to use the
|
|
278
|
+
nowadays deprecated ``case_insensitive`` argument.
|
|
283
279
|
|
|
284
|
-
Lines are returned as
|
|
285
|
-
|
|
286
|
-
|
|
280
|
+
Lines are returned as a string with lines joined together with
|
|
281
|
+
a newline. Possible trailing newline is never returned. The number
|
|
282
|
+
of matching lines is automatically logged.
|
|
287
283
|
|
|
288
284
|
Examples:
|
|
289
285
|
| ${lines} = | Get Lines Containing String | ${result} | An example |
|
|
290
|
-
| ${ret} = | Get Lines Containing String | ${ret} | FAIL |
|
|
286
|
+
| ${ret} = | Get Lines Containing String | ${ret} | FAIL | ignore_case=True |
|
|
291
287
|
|
|
292
288
|
See `Get Lines Matching Pattern` and `Get Lines Matching Regexp`
|
|
293
289
|
if you need more complex pattern matching.
|
|
294
290
|
"""
|
|
295
|
-
if
|
|
296
|
-
|
|
297
|
-
|
|
291
|
+
if case_insensitive is not None:
|
|
292
|
+
ignore_case = case_insensitive
|
|
293
|
+
if ignore_case:
|
|
294
|
+
pattern = pattern.casefold()
|
|
295
|
+
contains = lambda line: pattern in line.casefold()
|
|
298
296
|
else:
|
|
299
297
|
contains = lambda line: pattern in line
|
|
300
298
|
return self._get_matching_lines(string, contains)
|
|
301
299
|
|
|
302
|
-
def get_lines_matching_pattern(self, string, pattern,
|
|
300
|
+
def get_lines_matching_pattern(self, string: str, pattern: str,
|
|
301
|
+
case_insensitive: 'bool|None' = None,
|
|
302
|
+
ignore_case: bool = False):
|
|
303
303
|
"""Returns lines of the given ``string`` that match the ``pattern``.
|
|
304
304
|
|
|
305
305
|
The ``pattern`` is a _glob pattern_ where:
|
|
@@ -310,27 +310,28 @@ class String:
|
|
|
310
310
|
|
|
311
311
|
A line matches only if it matches the ``pattern`` fully.
|
|
312
312
|
|
|
313
|
-
The match is case-sensitive by default, but
|
|
314
|
-
a true value
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
in Python.
|
|
313
|
+
The match is case-sensitive by default, but that can be changed by
|
|
314
|
+
giving ``ignore_case`` a true value. This option is new in Robot
|
|
315
|
+
Framework 7.0, but with older versions it is possible to use the
|
|
316
|
+
nowadays deprecated ``case_insensitive`` argument.
|
|
318
317
|
|
|
319
|
-
Lines are returned as
|
|
320
|
-
|
|
321
|
-
|
|
318
|
+
Lines are returned as a string with lines joined together with
|
|
319
|
+
a newline. Possible trailing newline is never returned. The number
|
|
320
|
+
of matching lines is automatically logged.
|
|
322
321
|
|
|
323
322
|
Examples:
|
|
324
323
|
| ${lines} = | Get Lines Matching Pattern | ${result} | Wild???? example |
|
|
325
|
-
| ${ret} = | Get Lines Matching Pattern | ${ret} | FAIL: * |
|
|
324
|
+
| ${ret} = | Get Lines Matching Pattern | ${ret} | FAIL: * | ignore_case=True |
|
|
326
325
|
|
|
327
326
|
See `Get Lines Matching Regexp` if you need more complex
|
|
328
327
|
patterns and `Get Lines Containing String` if searching
|
|
329
328
|
literal strings is enough.
|
|
330
329
|
"""
|
|
331
|
-
if
|
|
332
|
-
|
|
333
|
-
|
|
330
|
+
if case_insensitive is not None:
|
|
331
|
+
ignore_case = case_insensitive
|
|
332
|
+
if ignore_case:
|
|
333
|
+
pattern = pattern.casefold()
|
|
334
|
+
matches = lambda line: fnmatchcase(line.casefold(), pattern)
|
|
334
335
|
else:
|
|
335
336
|
matches = lambda line: fnmatchcase(line, pattern)
|
|
336
337
|
return self._get_matching_lines(string, matches)
|
|
@@ -344,10 +345,7 @@ class String:
|
|
|
344
345
|
|
|
345
346
|
Lines match only if they match the pattern fully by default, but
|
|
346
347
|
partial matching can be enabled by giving the ``partial_match``
|
|
347
|
-
argument a true value.
|
|
348
|
-
if it is a non-empty string that is not equal to ``false``, ``none`` or
|
|
349
|
-
``no``. If the value is not a string, its truth value is got directly
|
|
350
|
-
in Python.
|
|
348
|
+
argument a true value.
|
|
351
349
|
|
|
352
350
|
If the pattern is empty, it matches only empty lines by default.
|
|
353
351
|
When partial matching is enabled, empty pattern matches all lines.
|
|
@@ -372,16 +370,14 @@ class String:
|
|
|
372
370
|
|
|
373
371
|
The ``flags`` argument is new in Robot Framework 6.0.
|
|
374
372
|
"""
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
else:
|
|
378
|
-
match = re.compile(pattern + '$', flags=parse_re_flags(flags)).match
|
|
373
|
+
regexp = re.compile(pattern, flags=parse_re_flags(flags))
|
|
374
|
+
match = regexp.search if partial_match else regexp.fullmatch
|
|
379
375
|
return self._get_matching_lines(string, match)
|
|
380
376
|
|
|
381
377
|
def _get_matching_lines(self, string, matches):
|
|
382
378
|
lines = string.splitlines()
|
|
383
379
|
matching = [line for line in lines if matches(line)]
|
|
384
|
-
logger.info('
|
|
380
|
+
logger.info(f'{len(matching)} out of {len(lines)} lines matched.')
|
|
385
381
|
return '\n'.join(matching)
|
|
386
382
|
|
|
387
383
|
def get_regexp_matches(self, string, pattern, *groups, flags=None):
|
|
@@ -648,9 +644,9 @@ class String:
|
|
|
648
644
|
|
|
649
645
|
Examples:
|
|
650
646
|
| ${ignore first} = | Get Substring | ${string} | 1 | |
|
|
651
|
-
| ${ignore last} = | Get Substring | ${string} |
|
|
647
|
+
| ${ignore last} = | Get Substring | ${string} | 0 | -1 |
|
|
652
648
|
| ${5th to 10th} = | Get Substring | ${string} | 4 | 10 |
|
|
653
|
-
| ${first two} = | Get Substring | ${string} |
|
|
649
|
+
| ${first two} = | Get Substring | ${string} | 0 | 1 |
|
|
654
650
|
| ${last two} = | Get Substring | ${string} | -2 | |
|
|
655
651
|
"""
|
|
656
652
|
start = self._convert_to_index(start, 'start')
|
|
@@ -693,16 +689,16 @@ class String:
|
|
|
693
689
|
|
|
694
690
|
The default error message can be overridden with the optional ``msg`` argument.
|
|
695
691
|
"""
|
|
696
|
-
if not
|
|
697
|
-
|
|
692
|
+
if not isinstance(item, str):
|
|
693
|
+
raise AssertionError(msg or f"{item!r} is {type_name(item)}, not a string.")
|
|
698
694
|
|
|
699
695
|
def should_not_be_string(self, item, msg=None):
|
|
700
696
|
"""Fails if the given ``item`` is a string.
|
|
701
697
|
|
|
702
698
|
The default error message can be overridden with the optional ``msg`` argument.
|
|
703
699
|
"""
|
|
704
|
-
if
|
|
705
|
-
|
|
700
|
+
if isinstance(item, str):
|
|
701
|
+
raise AssertionError(msg or f"{item!r} is a string.")
|
|
706
702
|
|
|
707
703
|
def should_be_unicode_string(self, item, msg=None):
|
|
708
704
|
"""Fails if the given ``item`` is not a Unicode string.
|
|
@@ -710,8 +706,7 @@ class String:
|
|
|
710
706
|
On Python 3 this keyword behaves exactly the same way `Should Be String`.
|
|
711
707
|
That keyword should be used instead and this keyword will be deprecated.
|
|
712
708
|
"""
|
|
713
|
-
|
|
714
|
-
self._fail(msg, "'%s' is not a Unicode string.", item)
|
|
709
|
+
self.should_be_string(item, msg)
|
|
715
710
|
|
|
716
711
|
def should_be_byte_string(self, item, msg=None):
|
|
717
712
|
"""Fails if the given ``item`` is not a byte string.
|
|
@@ -720,8 +715,8 @@ class String:
|
|
|
720
715
|
|
|
721
716
|
The default error message can be overridden with the optional ``msg`` argument.
|
|
722
717
|
"""
|
|
723
|
-
if not
|
|
724
|
-
|
|
718
|
+
if not isinstance(item, bytes):
|
|
719
|
+
raise AssertionError(msg or f"{item!r} is not a byte string.")
|
|
725
720
|
|
|
726
721
|
def should_be_lower_case(self, string, msg=None):
|
|
727
722
|
"""Fails if the given ``string`` is not in lower case.
|
|
@@ -735,7 +730,7 @@ class String:
|
|
|
735
730
|
See also `Should Be Upper Case` and `Should Be Title Case`.
|
|
736
731
|
"""
|
|
737
732
|
if not string.islower():
|
|
738
|
-
|
|
733
|
+
raise AssertionError(msg or f"{string!r} is not lower case.")
|
|
739
734
|
|
|
740
735
|
def should_be_upper_case(self, string, msg=None):
|
|
741
736
|
"""Fails if the given ``string`` is not in upper case.
|
|
@@ -749,7 +744,7 @@ class String:
|
|
|
749
744
|
See also `Should Be Title Case` and `Should Be Lower Case`.
|
|
750
745
|
"""
|
|
751
746
|
if not string.isupper():
|
|
752
|
-
|
|
747
|
+
raise AssertionError(msg or f"{string!r} is not upper case.")
|
|
753
748
|
|
|
754
749
|
@keyword(types=None)
|
|
755
750
|
def should_be_title_case(self, string, msg=None, exclude=None):
|
|
@@ -782,7 +777,7 @@ class String:
|
|
|
782
777
|
See also `Should Be Upper Case` and `Should Be Lower Case`.
|
|
783
778
|
"""
|
|
784
779
|
if string != self.convert_to_title_case(string, exclude):
|
|
785
|
-
|
|
780
|
+
raise AssertionError(msg or f"{string!r} is not title case.")
|
|
786
781
|
|
|
787
782
|
def _convert_to_index(self, value, name):
|
|
788
783
|
if value == '':
|
|
@@ -795,10 +790,5 @@ class String:
|
|
|
795
790
|
try:
|
|
796
791
|
return int(value)
|
|
797
792
|
except ValueError:
|
|
798
|
-
raise ValueError("Cannot convert
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
def _fail(self, message, default_template, *items):
|
|
802
|
-
if not message:
|
|
803
|
-
message = default_template % tuple(safe_str(item) for item in items)
|
|
804
|
-
raise AssertionError(message)
|
|
793
|
+
raise ValueError(f"Cannot convert {name!r} argument {value!r} "
|
|
794
|
+
f"to an integer.")
|