예제 #1
0
 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)
예제 #2
0
 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']
예제 #3
0
 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']
예제 #4
0
 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))
예제 #5
0
 def testConfigCreated(self):
     from mr.developer.extension import extension
     extension(self.buildout)
     self.failUnless('.mr.developer.cfg' in os.listdir(self.tempdir))
예제 #6
0
 def testBuildoutArgsSaved(self, extension):
     extension.executable = 'buildout'
     extension()
     assert hasattr(extension.get_config(), 'buildout_args')
예제 #7
0
 def testArgsIgnoredIfNotBuildout(self, extension):
     extension()
     assert extension.get_config().buildout_args == []
예제 #8
0
 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']
예제 #9
0
 def testBuildoutArgsSaved(self, extension):
     extension.executable = 'buildout'
     extension()
     assert hasattr(extension.get_config(), 'buildout_args')
예제 #10
0
 def testArgsIgnoredIfNotBuildout(self, extension):
     extension()
     assert extension.get_config().buildout_args == []
예제 #11
0
 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']
예제 #12
0
 def testConfigCreated(self):
     from mr.developer.extension import extension
     extension(self.buildout)
     self.failUnless('.mr.developer.cfg' in os.listdir(self.tempdir))