How can I exclude some code from tests?

How can I exclude some code from tests? Ideally I'd like to have 2 exclude annotations, one that is active when :test is, but that doesn't have any special meaning, like test and one that is the "opposite", i.e :no_test that is defined every time except when I run test. Is there a way to achieve this? The only way I can do it is to define 2 of my excludeAnnotations and then comment in/out in jungle file before and after I run the tests, but that's ugly.

Specifically I have code in my app that activates ANT sensor that fails when I run the tests, and I don't really need it anyway, so I'd like to do something like:

(:no_test)
function activateSensor() {
  // activate it
}
(:is_test)
function activateSensor() {
  // don't do anything
}