diff options
author | Kevin McCarthy <kmccarth@redhat.com> | 2007-09-04 10:22:45 -0700 |
---|---|---|
committer | Kevin McCarthy <kmccarth@redhat.com> | 2007-09-04 10:22:45 -0700 |
commit | c85c8eede36224e72b42153708dd58a9f0610b0d (patch) | |
tree | 02da14d197ad1f2a7b1e4265a91df276952c7c8c /ipa-python | |
parent | 90a34f386555ca8352e38b6186136a6750517116 (diff) | |
download | freeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.tar.gz freeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.tar.xz freeipa-c85c8eede36224e72b42153708dd58a9f0610b0d.zip |
Add 'test' target to makefiles. Hook up ipautil tests to run.
Diffstat (limited to 'ipa-python')
-rw-r--r-- | ipa-python/Makefile | 8 | ||||
-rw-r--r-- | ipa-python/test/test_ipautil.py | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/ipa-python/Makefile b/ipa-python/Makefile index 542c50820..4b20d4bb7 100644 --- a/ipa-python/Makefile +++ b/ipa-python/Makefile @@ -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 $< + + diff --git a/ipa-python/test/test_ipautil.py b/ipa-python/test/test_ipautil.py index 16991eff8..54ff1dc26 100644 --- a/ipa-python/test/test_ipautil.py +++ b/ipa-python/test/test_ipautil.py @@ -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" |