Fix the confval type checker emits warnings if unicode is given to confvals which expects string value

This commit is contained in:
Takeshi KOMIYA
2016-02-19 23:35:10 +09:00
parent 041aa6055f
commit 606daeda18
4 changed files with 58 additions and 28 deletions

View File

@@ -186,9 +186,18 @@ TYPECHECK_WARNINGS = {
'value8': False,
'value9': False,
'value10': False,
'value11': True,
'value12': False,
'value13': False,
'value14': False,
'value15': False,
'value16': False,
}
@gen_with_app(testroot='config')
def test_gen_check_types(app, status, warning):
if PY3:
TYPECHECK_WARNINGS['value11'] = False
for key, should in iteritems(TYPECHECK_WARNINGS):
yield assert_in if should else assert_not_in, key, warning.getvalue(), \
'override on "%s" should%s raise a type warning' % \