Fix #1921: Support figure substitutions by locale

This commit is contained in:
Takeshi KOMIYA
2016-01-27 01:36:43 +09:00
parent 46138ca605
commit 1f5aa28db0
13 changed files with 325 additions and 27 deletions

View File

@@ -94,6 +94,16 @@ def assert_startswith(thing, prefix):
assert False, '%r does not start with %r' % (thing, prefix)
def assert_node(node, cls=None, **kwargs):
if cls:
assert isinstance(node, cls), '%r is not subclass of %r' % (node, cls)
for key, value in kwargs.items():
assert key in node, '%r does not have %r attribute' % (node, key)
assert node[key] == value, \
'%r[%s]: %r does not equals %r' % (node, key, node[key], value)
try:
from nose.tools import assert_in, assert_not_in
except ImportError: