test_block() {
	coverage run `which nose2` $1.tests
	coverage report --include="$1/*" -m
}

unused_blocks() {
for blockcfg in etc/blocks/*; do 
  block=$(echo $blockcfg | sed 's/.*\/\(.*\)\.cfg/\1/'); 
  grep "$block" etc/services/* > /dev/null || echo $block; 
done
}

remove_unused_blocks() {
for blockcfg in etc/blocks/*; do 
  block=$(echo $blockcfg | sed 's/.*\/\(.*\)\.cfg/\1/'); 
  grep "$block" etc/services/* > /dev/null || rm -f $blockcfg; 
done
}

alias test_block="py.test --cov=. --cov-report term-missing -s tests"

unused_blocks() {
for blockcfg in etc/blocks/*; do 
  block=$(echo $blockcfg | sed 's/.*\/\(.*\)\.cfg/\1/'); 
  grep "$block" etc/services/* > /dev/null || echo $block; 
done
}

remove_unused_blocks() {
for blockcfg in etc/blocks/*; do 
  block=$(echo $blockcfg | sed 's/.*\/\(.*\)\.cfg/\1/'); 
  grep "$block" etc/services/* > /dev/null || rm -f $blockcfg; 
done
}

Change test n.io block alias to py.test
Change test n.io block alias to py.test
