Skip to content

Commit

Permalink
Cleaning cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrink10 committed Jul 8, 2021
1 parent 0d56fad commit 6929cb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/basilisp/test/fixtures.lpy
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"`basilisp.test` fixture which creates a temporary directory for the duration
of the test.
The temporary directory name is yielded by the fixture and bound to the dynamic
Var `*tempdir*`."
The temporary directory name is bound to the dynamic Var `*tempdir*`."
[]
(with-open [d (tempfile/TemporaryDirectory)]
(binding [*tempdir* d]
(yield d))))
(yield))))
9 changes: 4 additions & 5 deletions tests/basilisp/test_io.lpy
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
Serves files from `*tempdir*` provided by the corresponding fixture."
[]
;; The Python 3.6 version of SimpleHTTPRequestHandler does not
;; support setting the directory it serves files from, so we
;; use reader conditionals to switch the working directory
;; to `tempdir` to avoid conflicting with any files in the
;; current work tree.
;; The Python 3.6 version of SimpleHTTPRequestHandler does not support setting the
;; directory it serves files from, so we use reader conditionals to switch the
;; working directory to `tempdir` to avoid conflicting with any files in the current
;; work tree.
(let [workdir *tempdir*
handler #?(:lpy36 http.server/SimpleHTTPRequestHandler
:lpy37+ (partial-kw http.server/SimpleHTTPRequestHandler :directory workdir))
Expand Down

0 comments on commit 6929cb2

Please sign in to comment.