Add 'test' target to makefiles. Hook up ipautil tests to run.

This commit is contained in:
Kevin McCarthy
2007-09-04 10:22:45 -07:00
parent 90a34f3865
commit c85c8eede3
6 changed files with 26 additions and 2 deletions
+8
View File
@@ -1,6 +1,7 @@
PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib()")
PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa
CONFIGDIR ?= $(DESTDIR)/etc/ipa
TESTS = $(wildcard test/*.py)
all: ;
@@ -15,3 +16,10 @@ install:
clean:
rm -f *~ *.pyc
.PHONY: test
test: $(subst .py,.tst,$(TESTS))
%.tst: %.py
python $<
+7 -2
View File
@@ -17,12 +17,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import sys
sys.path.insert(0, ".")
import unittest
import ipa.ipautil
import ipautil
class TestCIDict(unittest.TestCase):
def setUp(self):
self.cidict = ipa.ipautil.CIDict()
self.cidict = ipautil.CIDict()
self.cidict["Key1"] = "val1"
self.cidict["key2"] = "val2"
self.cidict["KEY3"] = "VAL3"