[yum-cvs] yum/test alltests.py, NONE, 1.1 packagetests.py, NONE, 1.1 settestpath.py, NONE, 1.1

James Bowes jbowes at linux.duke.edu
Thu Feb 15 17:19:01 UTC 2007


Update of /home/groups/yum/cvs/yum/test
In directory login1.linux.duke.edu:/tmp/cvs-serv8391/test

Added Files:
	alltests.py packagetests.py settestpath.py 
Log Message:
add test dir for unit tests, with sample inPrcoRange test

--- NEW FILE alltests.py ---
import unittest
import settestpath

import packagetests


def suite():
    # Append all test suites here:
    return unittest.TestSuite((
        packagetests.suite(),
    ))

if __name__ == "__main__":
    unittest.main(defaultTest="suite")

--- NEW FILE packagetests.py ---
import unittest
import settestpath

from yum import packages

class PackageTests(unittest.TestCase):

    def testInPrcoRange(self):
        po = packages.RpmBase()
        po.prco['provides'].append(("seth", "EQ", (1, 2, 3)))
        self.assertTrue(po.inPrcoRange('provides', ("seth", "GE", (1, 0, 0))))


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(PackageTests))
    return suite
                
if __name__ == "__main__":
    unittest.main(defaultTest="suite")

--- NEW FILE settestpath.py ---
import sys

# Adjust path so we can see the src modules running from branch as well
# as test dir:
sys.path.insert(0, './')
sys.path.insert(0, '../')
sys.path.insert(0, '../../')




More information about the Yum-cvs-commits mailing list