def test_to_docstring(self) -> None: """ Tests whether `docstring` produces `docstring_str` given `class_ast` """ self.assertEqual( emit.docstring(parse.class_(class_ast), emit_default_doc=True), docstring_str, )
def test_to_docstring_emit_default_doc_false(self) -> None: """ Tests whether `docstring` produces `docstring_str` given `class_ast` """ ir = parse.class_(class_ast) self.assertEqual( emit.docstring(ir, emit_default_doc=False), docstring_no_default_str, )
def test_to_argparse_google_tf_tensorboard(self) -> None: """ Tests whether `to_argparse` produces `argparse_function_google_tf_tensorboard_ast` given `class_google_tf_tensorboard_ast` """ run_ast_test( self, emit.argparse_function( parse.class_( class_google_tf_tensorboard_ast, merge_inner_function="__init__" ), emit_default_doc=False, emit_default_doc_in_return=False, ), gold=argparse_function_google_tf_tensorboard_ast, )