summaryrefslogtreecommitdiff
path: root/tests/format/options.py
Commit message (Collapse)AuthorAgeFilesLines
* exceptions: Expose ErrorDomain, ErrorLoadReasonThomas Coldrick2020-01-231-1/+1
| | | | | | | Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
* Reformat code using BlackChandan Singh2019-11-141-146/+135
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* _yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'Benjamin Schubert2019-07-151-5/+5
| | | | | | | | | - Adding 'get_sequence' on MappingNode to access sequences in a mapping - Adding 'sequence_at' on SequenceNode to access sequences in a sequence - Adding 'mapping_at' on SequenceNode to access mappings in a sequence Using "*_at" in sequences allows us to quickly understand if we are dealing with a sequence or a mapping.
* _yaml: Add 'as_str()' on ScalarNode and 'get_scalar()' on MappingNodeBenjamin Schubert2019-07-151-6/+6
| | | | | | | | | | - 'get_scalar()' allows retrieving a scalar node from a mapping. - 'as_str()' casts a ScalarNode into a string (thus removing the node information). Both together, those replace 'node_get(mapping, key, type=str)' but also allow retrieving the 'Node' itself, which will allow in the future lazier provenance computation.
* plugintestutils: Rename 'plugintestutils' package to 'testing'phil/rename-plugintestutilsPhil Dawson2019-04-161-1/+1
| | | | | | | | | - Rename plugintestutils to testing. - Don't run the tests from bst-plugins-template. This imports buildstream.plugintestutils so will have to be disabled to get through CI. This can be re nabled once bst-plugins-template has been patched.
* The new YAML World OrderDaniel Silverstone2019-03-271-8/+8
| | | | | | | | | Replace YAML internals with a new Node type, and refactor everything to use it cleanly. This work was also by James Ennis <james.ennis@codethink.co.uk> Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* tests:lint: disable 'unused-import' checks on pytest fixturesBenjamin Schubert2019-03-201-1/+1
| | | | | Pylint can't know that pytest's fixtures are used in a file and therefore reports false positives. Silencing all those errors
* tests:lint: silence redefined-outer-name in files using fixturesBenjamin Schubert2019-03-201-0/+3
| | | | | Pylint doesn't play well with pytest fixtures, we therefore need to silence this error.
* Expose basic api for testing external plugins.phil/plugin-testing-apiPhil Dawson2019-02-081-1/+1
| | | | | | | | | | | | | | | | | | We want external plugins to be able to make use of the core testing utils. This commit exposes the basic utilities which are currently in use in bst-external plugins. If necessary, more utilities could be exposed in the future. Moves the following files from tests/testutils/ to buildstream/plugintestingutils/: o runcli.py o integration.py As part of this, this commit makes the following changes to runcli.py and integration.py: o runcli.py: Fix linting errors o runcli.py: Add user facing documentation o Integration.py: Add user facing documentation
* tests/format/options.py: Added tests for invalid variable names in optionsTristan Van Berkom2018-04-061-0/+11
|
* tests/format/options.py: Added tests for invalid option name symbolsTristan Van Berkom2018-04-061-0/+13
|
* tests/format: Use new error assertions all aroundTristan Van Berkom2018-01-011-32/+13
|
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-1/+1
| | | | Hide all of buildstream's internal exceptions from the API surface.
* tests/format: Test proper failure of reference to undefined optionsTristan Van Berkom2017-10-231-0/+15
| | | | | When using an undefined option in a conditional expression, buildstream should error out and print a good message about it.
* tests/format/options.py: General tests for project optionsTristan Van Berkom2017-10-101-0/+228