diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-10 15:35:52 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-20 09:38:42 +0000 |
commit | 48456242b0a3067c0aa6a551c4a0c5972baf27c4 (patch) | |
tree | 84af60272e631816eefd58fb658a52b4a4ae5017 /tests/internals | |
parent | b7fb58d51a883a602b2117fe4107a94322256de1 (diff) | |
download | buildstream-48456242b0a3067c0aa6a551c4a0c5972baf27c4.tar.gz |
tests:lint: Raise exception instead of using 'assert False' for errors
This fixes a inconsistent-return-statements from pylint and makes it
easier to understand what is happening
Diffstat (limited to 'tests/internals')
-rw-r--r-- | tests/internals/yaml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py index 5c1383a25..c505fbd20 100644 --- a/tests/internals/yaml.py +++ b/tests/internals/yaml.py @@ -166,7 +166,9 @@ def load_yaml_file(filename, *, cache_path, shortname=None, from_cache='raw'): _yaml.load(filename, shortname, yaml_cache=yc) return _yaml.load(filename, shortname, yaml_cache=yc) else: - assert False + raise Exception( + "Invalid value for parameter 'from_cache', Expected 'raw' or 'cached'" + ) # Tests for list composition |