validators: fixup doctests after adding unicode_literals
This commit is contained in:
parent
0951e2063e
commit
b44e3d5087
@ -952,21 +952,26 @@ def fontLibValidator(value):
|
|||||||
>>> fontLibValidator(lib)
|
>>> fontLibValidator(lib)
|
||||||
(True, None)
|
(True, None)
|
||||||
|
|
||||||
>>> lib = {"public.glyphOrder" : [u"A", u"C", u"B"]}
|
|
||||||
>>> fontLibValidator(lib)
|
|
||||||
(True, None)
|
|
||||||
|
|
||||||
>>> lib = "hello"
|
>>> lib = "hello"
|
||||||
>>> fontLibValidator(lib)
|
>>> valid, msg = fontLibValidator(lib)
|
||||||
(False, 'The lib data is not in the correct format: expected a dictionary, found str')
|
>>> valid
|
||||||
|
False
|
||||||
|
>>> print(msg) # doctest: +ELLIPSIS
|
||||||
|
The lib data is not in the correct format: expected a dictionary, ...
|
||||||
|
|
||||||
>>> lib = {1: "hello"}
|
>>> lib = {1: "hello"}
|
||||||
>>> fontLibValidator(lib)
|
>>> valid, msg = fontLibValidator(lib)
|
||||||
(False, 'The lib key is not properly formatted: expected basestring, found int: 1')
|
>>> valid
|
||||||
|
False
|
||||||
|
>>> print(msg)
|
||||||
|
The lib key is not properly formatted: expected basestring, found int: 1
|
||||||
|
|
||||||
>>> lib = {"public.glyphOrder" : "hello"}
|
>>> lib = {"public.glyphOrder" : "hello"}
|
||||||
>>> fontLibValidator(lib)
|
>>> valid, msg = fontLibValidator(lib)
|
||||||
(False, 'public.glyphOrder is not properly formatted: expected list or tuple, found str')
|
>>> valid
|
||||||
|
False
|
||||||
|
>>> print(msg) # doctest: +ELLIPSIS
|
||||||
|
public.glyphOrder is not properly formatted: expected list or tuple,...
|
||||||
|
|
||||||
>>> lib = {"public.glyphOrder" : ["A", 1, "B"]}
|
>>> lib = {"public.glyphOrder" : ["A", 1, "B"]}
|
||||||
>>> fontLibValidator(lib)
|
>>> fontLibValidator(lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user