Test module docstrings

This commit is contained in:
Kodi Arfer 2018-03-11 15:51:40 -07:00
parent dc30584a8a
commit cfb042304c
2 changed files with 8 additions and 0 deletions

View File

@ -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]])

View File

@ -0,0 +1,3 @@
"This is the module docstring."
(setv foo 5)