mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #1921: Support figure substitutions by locale
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user