2

I have a little script

(use 
 :reload-all
 'com.example.package1
 'com.example.package2
 'com.example.package3
 'com.example.testlib)

(run-tests
 'com.example.package1
 'com.example.package2
 'com.example.package3)

that I use to quickly reload everything and fire off the unit tests.
trouble is that each time (deftest ... ) is evaluated as the files are read an additional test is created so after working hard all day each test is now being run 103 times, eek!

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
  • This question reveals either a shortcoming in my understanding of name spaces or test-is. I was under the impression that the :reload keyword caused all bindings in the given name space to be cleared. should this not also clear the tests? Are tests contained in vars that are part of the same name space in which they are deftest'ed? – Arthur Ulfeldt Jul 21 '09 at 18:09

1 Answers1

2

There is a flag *load-tests* which determines the behaviour of deftest. (doc deftest) seems to implicate that setting this flag to false could solve your problem.

pmf
  • 7,619
  • 4
  • 47
  • 77