def testSearchpath(self): # This get_searchpath test is brittle; it'll break if libpnd changes # its default behaviour, even though this won't cause problems. self.assertItemsEqual(options.get_searchpath(), ['/media/*/pandora/apps','/media/*/pandora/desktop', '/media/*/pandora/menu','/usr/pandora/apps', '/media/*/<1>', '/media/*/pandora/mmenu','/usr/pandora/mmenu'], """This failure could indicate a change in the behaviour of libpnd, rather than a failure in the Python wrapper. Check that.""" ) with open(options.get_cfg(), 'w') as cfg: cfg.write( """{ "repositories": [ "file://firsturl" ], "locales": ["default"], "searchpath": [ "/lolbuts", "/home/places/things/stuff/" ] }""") self.assertItemsEqual(options.get_searchpath(), ['/lolbuts', '/home/places/things/stuff/'] )
def testGetSearchpathFull(self): # This may also seem gratuitous, but it expands the globbing used in # libpnd so we know exactly where PNDs can be installed. self.assertItemsEqual(packages.get_searchpath_full(), options.get_searchpath())