def testConfigCreated(self, tempdir): from mr.developer.extension import extension buildout = MockBuildout(dict( buildout=dict( directory=tempdir, parts=''), sources={})) extension(buildout) assert '.mr.developer.cfg' in os.listdir(tempdir)
def testAutoCheckout(self, buildout, extension): buildout['sources'].update({ 'pkg.foo': 'svn dummy://pkg.foo', 'pkg.bar': 'svn dummy://pkg.bar', }) buildout['buildout']['auto-checkout'] = 'pkg.foo' extension() wcs = extension.get_workingcopies() assert len(wcs._events) == 1 assert wcs._events[0][0] == 'checkout' assert wcs._events[0][1] == ['pkg.foo']
def test_sources_dir_created(self): buildout = MockBuildout(dict( buildout = { 'directory': self.tempdir, 'parts': '', 'sources-dir': 'develop', }, sources={}, )) from mr.developer.extension import extension self.failIf('develop' in os.listdir(self.tempdir)) extension(buildout) self.failUnless('develop' in os.listdir(self.tempdir))
def testConfigCreated(self): from mr.developer.extension import extension extension(self.buildout) self.failUnless('.mr.developer.cfg' in os.listdir(self.tempdir))
def testBuildoutArgsSaved(self, extension): extension.executable = 'buildout' extension() assert hasattr(extension.get_config(), 'buildout_args')
def testArgsIgnoredIfNotBuildout(self, extension): extension() assert extension.get_config().buildout_args == []
def testPartAdded(self, buildout, extension): assert '_mr.developer' not in buildout['buildout']['parts'] extension() assert '_mr.developer' in buildout assert '_mr.developer' in buildout['buildout']['parts']