hey @seancorfield lazytest will load everything under test. if you want it to only load a specific file, i think you gotta do -d path/to/file.clj
i think changing -n to inform which namespaces are loaded is probably smart tho
(defn require-dirs [config dirs]
(let [dirs (map io/file (or dirs #{"test"}))
md-nses (add-md-tests config dirs)
nses (into (find-ns-decls dirs)
md-nses)]
(when (empty? nses)
(throw (ex-info "No namespaces to run" {:dirs dirs})))
(apply require nses)
nses))
that's called unconditionally by -main
adding something like
nses (if-let [ns-filter (:ns-filter config)]
(filterv ns-filter nses)
nses)
would probably work just finehmm no that won't work because you can filter vars too
No worries. I hit a non-LazyTest issue now so this is probably pretty fruitless (I solved the loading issue with reader conditionals 😉 )
i think this is a worthwhile change, so if you get a moment, wanna open a github issue with a small comment? i'm out with my family and don't wanna forget
I'm not sure what change you're suggesting here?
sorry, never mind. i'm on my computer sooner than anticipated
https://github.com/NoahTheDuke/lazytest/issues/35 is what i meant
Ah, so if you filter by ns, it would no longer even load the unwanted nses? That would be nice. And for Var filters, it would only load the nses mentioned in those Vars?
Right
looks like it's actually pretty easy to do, once i actually looked at the code proper. i think it's technically a breaking change (if you're doing naughty stuff like interning in namespaces, or globally referencing a defrecord class), but if you're doing that, stop being naughty?
just require/import the class/namespace as necessary
Yup, def.
thankfully, we're not using multimethods for assert-expr so we don't need to worry about those kinds of side-effects