Merge pull request #623 from algernon/f/botsbuildbots

Add a `Botsbuildbots` function
This commit is contained in:
Berker Peksag 2014-09-05 14:01:22 +03:00
commit c0ea1308bf
4 changed files with 21 additions and 1 deletions

View File

@ -352,7 +352,10 @@
parsed)
(def *exports* '[butlast calling-module-name coll? cons cons? cycle
(defun Botsbuildbots () (Botsbuildbots))
(def *exports* '[Botsbuildbots
butlast calling-module-name coll? cons cons? cycle
dec distinct disassemble drop drop-while empty? even?
every? first filter filterfalse flatten float? gensym identity
inc input instance? integer integer? integer-char? interleave

View File

@ -198,3 +198,15 @@
(.append ret
`(setv ~name ~main)))
ret))
(defmacro Botsbuildbots []
"Build bots, repeatedly.^W^W^WPrint the AUTHORS, forever."
`(try
(do
(import [requests])
(let [[r (requests.get
"https://raw.githubusercontent.com/hylang/hy/master/AUTHORS")]]
(repeat r.text)))
(catch [e ImportError]
(repeat "Botsbuildbots requires `requests' to function."))))

View File

@ -1,3 +1,5 @@
# for Botsbuildbots
requests
# code quality
flake8
coverage

View File

@ -214,3 +214,6 @@
(assert (= (tda-a1) :bazinga))
(assert (= (tda-a2) :bazinga))
(assert (= tda-main tda-a1 tda-a2)))
(defn test-botsbuildbots []
(assert (> (len (first (Botsbuildbots))) 50)))