better error messages if option doesn't exists
This commit is contained in:
14
tests/test_simple.py
Normal file
14
tests/test_simple.py
Normal file
@ -0,0 +1,14 @@
|
||||
from json import loads
|
||||
from tiramisu_api import Config
|
||||
from pytest import raises
|
||||
|
||||
|
||||
def test_list_option():
|
||||
filename = 'tests/data/boolean1.json'
|
||||
with open(filename, 'r') as fh:
|
||||
json = loads(fh.read())
|
||||
#
|
||||
config = Config(json)
|
||||
opts = []
|
||||
raises(AttributeError, "config.option('unknown').value.get()")
|
||||
raises(AttributeError, "config.option('options.unknown').value.get()")
|
Reference in New Issue
Block a user