From 916bf4535a0435a32053273f2139bf7f37053754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Fri, 24 Jun 2005 15:38:54 +0000 Subject: [PATCH] * add util test --- tests/run.py | 2 ++ tests/utiltests.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/utiltests.py diff --git a/tests/run.py b/tests/run.py index 0aedac86..efea4548 100755 --- a/tests/run.py +++ b/tests/run.py @@ -10,6 +10,7 @@ runTestSuite = lambda(x): unittest.TextTestRunner(verbosity=2).run(x) def run_all(): + import utiltests import specfiletests import metadatatests import constantstests @@ -20,6 +21,7 @@ def run_all(): import actionsapitests alltests = unittest.TestSuite(( + utiltests.utiltests, specfiletests.suite, specfiletests.suite, metadatatests.suite, diff --git a/tests/utiltests.py b/tests/utiltests.py new file mode 100644 index 00000000..6540e65d --- /dev/null +++ b/tests/utiltests.py @@ -0,0 +1,17 @@ + +import unittest +import os + +from pisi import version +from pisi.util import * + +class UtilTestCase(unittest.TestCase): + def setUp(self): + pass + + def testSubPath(self): + self.assert_(subpath('usr', 'usr')) + self.assert_(subpath('usr', 'usr/local/src')) + self.assert_(not subpath('usr/local', 'usr')) + +suite = unittest.makeSuite(UtilTestCase)