Exemple #1
0
def setup_dirs():
    """
    Ensure that snapcraft.common plugindir is setup correctly
    and support running out of a development snapshot
    """
    from snapcraft import common
    topdir = os.path.abspath(os.path.join(__file__, '..', '..'))
    # only change the default if we are running from a checkout
    if os.path.exists(os.path.join(topdir, 'setup.py')):
        common.set_plugindir(os.path.join(topdir, 'plugins'))
        common.set_schemadir(os.path.join(topdir, 'schema'))
Exemple #2
0
 def test_set_plugindir(self):
     plugindir = os.path.join(self.path, 'testplugin')
     common.set_plugindir(plugindir)
     self.assertEqual(plugindir, common.get_plugindir())
Exemple #3
0
 def test_set_plugindir(self):
     plugindir = os.path.join(self.path, 'testplugin')
     common.set_plugindir(plugindir)
     self.assertEqual(plugindir, common.get_plugindir())