Test module docstrings
This commit is contained in:
parent
dc30584a8a
commit
cfb042304c
@ -1785,6 +1785,11 @@ macros()
|
|||||||
(assert (none? (. f4 __doc__)))
|
(assert (none? (. f4 __doc__)))
|
||||||
(assert (= (f4 [1 2]) "not a docstring")))
|
(assert (= (f4 [1 2]) "not a docstring")))
|
||||||
|
|
||||||
|
(defn test-module-docstring []
|
||||||
|
(import [tests.resources.module-docstring-example :as m])
|
||||||
|
(assert (= m.__doc__ "This is the module docstring."))
|
||||||
|
(assert (= m.foo 5)))
|
||||||
|
|
||||||
(defn test-relative-import []
|
(defn test-relative-import []
|
||||||
"Make sure relative imports work properly"
|
"Make sure relative imports work properly"
|
||||||
(import [..resources [tlib]])
|
(import [..resources [tlib]])
|
||||||
|
3
tests/resources/module_docstring_example.hy
Normal file
3
tests/resources/module_docstring_example.hy
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
"This is the module docstring."
|
||||||
|
|
||||||
|
(setv foo 5)
|
Loading…
Reference in New Issue
Block a user