1. Marcus von Appen
  2. py-dynrules


Marcus von Appen  committed aee705d

- do not rely on absolute module imports for the unit tests

  • Participants
  • Parent commits 232002d
  • Branches default

Comments (0)

Files changed (3)

File Makefile

View file
 	@echo "Cleaning up in $(top_srcdir)/ ..."
 	@rm -f *.cache *.core *~ MANIFEST
-	@rm -rf build dist
+	@rm -rf build dist __pycache__
 	@for dir in $(SUBDIRS); do \
 		if test -f $$dir/Makefile; then \
 		else \
 			cd $$dir; \
 			echo "Cleaning up in $$dir..."; \
-			rm -f *~ *.cache *.core *.pyc; \
+			rm -rf *~ *.cache *.core *.pyc __pycache__; \
 		fi \
 	@make clean
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) python2.6 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) python2.7 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) python3.1 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) python3.2 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) python3.3 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
-	@-PYTHONPATH=$(PYTHONPATH) pypy1.9 dynrules/test/util/runtests.py
-	@rm -rf dynrules/test/*.pyc
+	@-PYTHONPATH=$(PYTHONPATH) python2.6 -B -m dynrules.test.util.runtests
+	@-PYTHONPATH=$(PYTHONPATH) python2.7 -B -m dynrules.test.util.runtests
+	@-PYTHONPATH=$(PYTHONPATH) python3.1 -B -m dynrules.test.util.runtests
+	@-PYTHONPATH=$(PYTHONPATH) python3.2 -B -m dynrules.test.util.runtests
+	@-PYTHONPATH=$(PYTHONPATH) python3.3 -B -m dynrules.test.util.runtests
+	@-PYTHONPATH=$(PYTHONPATH) pypy1.9 -B -m dynrules.test.util.runtests
 	@python2.6 -c "import dynrules.test; dynrules.test.run()"
 	rm -rf /usr/local/lib/python3.2/site-packages/dynrules*
 	rm -rf /usr/local/lib/python3.3/site-packages/dynrules*
 	rm -rf /usr/local/lib/pypy-1.9/site-packages/dynrules*

File doc/intro.rst

View file
 dynrules needs at least **Python 2.6** to run and was successfully
-tested with the versions **2.6, 2.7, 3.1, 3.2** and **PyPy 1.9**. It
+tested with the versions **2.6, 2.7, 3.1, 3.2, 3.3** and **PyPy 1.9**. It
 features both, a C and pure Python implementation, letting you choose
 whatever suits you more. By default, both implementations will be
 installed, but the C implementation will be preferred by the dynrules

File dynrules/test/util/runtests.py

View file
 import subprocess
 import time
-    from dynrules.test.util import support, testrunner
-    import support
-    import testrunner
+from . import support, testrunner
 if sys.version_info[0] >= 3:
     MAXINT = sys.maxsize
 def gettestfiles(testdir=None, randomizer=None):
     """Get all test files from the passed test directory. If none is
-    passed, use the default pygame2 test directory.
+    passed, use the default test directory.
     if not testdir:
         testdir = os.path.dirname(__file__)