diff --git a/Makefile b/Makefile index e3b72de..74f0ec9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ all: - python test.py + ./setup.py test clean: rm -f *.pyc diff --git a/setup.py b/setup.py index 253b8f5..fb122b4 100755 --- a/setup.py +++ b/setup.py @@ -27,5 +27,8 @@ classifiers=[ "Programming Language :: Python", "Topic :: Multimedia", "Topic :: Utilities" -] +], + +test_suite="tests.all" + ) diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..f9de449 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,11 @@ +import unittest +import testtvorganise + +def all(): + + suite = unittest.TestSuite() + + testtvorganise.suite(suite) + + return suite + diff --git a/tests/testtvorganise.py b/tests/testtvorganise.py index d77a127..dc1341c 100755 --- a/tests/testtvorganise.py +++ b/tests/testtvorganise.py @@ -45,8 +45,11 @@ class testFindFiles(unittest.TestCase): def testCrapInput(self): self.assertEqual(len(tvorganise.find_files("belfrhe")),0) -def suite(): - suite = unittest.TestSuite() +def suite(suite=None): + + if not suite: + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(testTvOrganise)) suite.addTest(unittest.makeSuite(testFindFiles))