Fix missing import in doc
macro expansion
This commit is contained in:
parent
1707f602f7
commit
96f99c29d1
@ -6,8 +6,6 @@
|
|||||||
;;; These macros form the hy language
|
;;; These macros form the hy language
|
||||||
;;; They are automatically required in every module, except inside hy.core
|
;;; They are automatically required in every module, except inside hy.core
|
||||||
|
|
||||||
(import [importlib [import-module]])
|
|
||||||
|
|
||||||
(import [hy.models [HyList HySymbol]])
|
(import [hy.models [HyList HySymbol]])
|
||||||
|
|
||||||
(defmacro as-> [head name &rest rest]
|
(defmacro as-> [head name &rest rest]
|
||||||
@ -248,6 +246,7 @@ Such 'o!' params are available within `body` as the equivalent 'g!' symbol."
|
|||||||
Use ``#doc foo`` instead for help with tag macro ``#foo``.
|
Use ``#doc foo`` instead for help with tag macro ``#foo``.
|
||||||
Use ``(help foo)`` instead for help with runtime objects."
|
Use ``(help foo)`` instead for help with runtime objects."
|
||||||
`(try
|
`(try
|
||||||
|
(import [importlib [import-module]])
|
||||||
(help (. (import-module "hy")
|
(help (. (import-module "hy")
|
||||||
macros
|
macros
|
||||||
_hy_macros
|
_hy_macros
|
||||||
@ -265,6 +264,7 @@ Such 'o!' params are available within `body` as the equivalent 'g!' symbol."
|
|||||||
|
|
||||||
Gets help for a tag macro function available in this module."
|
Gets help for a tag macro function available in this module."
|
||||||
`(try
|
`(try
|
||||||
|
(import [importlib [import-module]])
|
||||||
(help (. (import-module "hy")
|
(help (. (import-module "hy")
|
||||||
macros
|
macros
|
||||||
_hy_tag
|
_hy_tag
|
||||||
|
@ -682,3 +682,10 @@ result['y in globals'] = 'y' in globals()")
|
|||||||
(defn test-comment []
|
(defn test-comment []
|
||||||
(assert-none (comment <h1>This is merely a comment.</h1>
|
(assert-none (comment <h1>This is merely a comment.</h1>
|
||||||
<p> Move along. (Nothing to see here.)</p>)))
|
<p> Move along. (Nothing to see here.)</p>)))
|
||||||
|
|
||||||
|
(defn test-doc [capsys]
|
||||||
|
(doc doc)
|
||||||
|
(setv out_err (.readouterr capsys))
|
||||||
|
(assert (.startswith (.strip (first out_err))
|
||||||
|
"Help on function (doc) in module hy.core.macros:"))
|
||||||
|
(assert (empty? (second out_err))))
|
||||||
|
Loading…
Reference in New Issue
Block a user