def print_node_info(alias): print alias _, settings = Node.plugins[alias] instance = Node.create_instance(alias, "dummy", dummy_wrapper()) instance.update_settings(settings) print '' print instance.setting('help') print '' if len(instance._instance_settings) > 2: print('Settings:') for k in sorted(instance._instance_settings): if k in ( 'aliases', 'help', ): continue tup = instance._instance_settings[k] print " %s" % k for line in inspect.cleandoc(tup[0]).splitlines(): print " %s" % line print " default value: %s" % tup[1] print ''
def print_node_info(alias): print alias _, settings = Node.plugins[alias] instance = Node.create_instance(alias, "dummy", dummy_wrapper()) instance.update_settings(settings) print '' print instance.setting('help') print '' if len(instance._instance_settings) > 2: print('Settings:') for k in sorted(instance._instance_settings): if k in ('aliases', 'help',): continue tup = instance._instance_settings[k] print " %s" % k for line in inspect.cleandoc(tup[0]).splitlines(): print " %s" % line print " default value: %s" % tup[1] print ''
def test_doc_node_populate(): with wrap() as wrapper: node = Node.create_instance( 'doc', "foo.txt", wrapper, [], contents='foo') assert node.key_with_class() == "doc:foo.txt"
def test_doc_node_with_filters(): with wrap() as wrapper: node = Node.create_instance('doc', "foo.txt|outputabc", wrapper, [], contents='foo') assert node.key_with_class() == "doc:foo.txt|outputabc"
def test_doc_node_populate(): with wrap() as wrapper: node = Node.create_instance('doc', "foo.txt", wrapper, [], contents='foo') assert node.key_with_class() == "doc:foo.txt"