Re: syntax quoting and namespaces misbehaving in test?

2011-08-16 Thread Richard Rattigan
;>> >> deftest is a macro.  Macros are expanded at compile time.  So, in this > >>> >> case, at compile time, a function called namespace2 is def'd with meta > >>> >> data :test set to the body of your deftest. > > >>> >> All of that body is namespac

Re: syntax quoting and namespaces misbehaving in test?

2011-08-15 Thread Richard Rattigan
thing))) On Aug 15, 1:42 pm, Alan Malloy wrote: > On Aug 15, 6:16 am, Richard  Rattigan wrote: > > > > > > > > > > > I don't understand why this test would fail - can anyone explain why? > > > (ns learn.clojure.test.core > >   (:use [

Re: syntax quoting and namespaces misbehaving in test?

2011-08-15 Thread Richard Rattigan
Okay, that makes sense - although it does seem potentially confusing. Thanks! On Aug 15, 1:42 pm, Alan Malloy wrote: > On Aug 15, 6:16 am, Richard  Rattigan wrote: > > > > > > > > > > > I don't understand why this test would fail - can anyone expla

syntax quoting and namespaces misbehaving in test?

2011-08-15 Thread Richard Rattigan
I don't understand why this test would fail - can anyone explain why? (ns learn.clojure.test.core (:use [clojure.test])) (deftest namespaces (in-ns 'my.new.namespace) (is (= "my.new.namespace" (str *ns*))) (is (= `anything 'my.new.namespace/anything))) expected: (= (quote learn.clojure.te