* add util test
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user