All pastes #163585 Raw Edit

Someone

public text v1 · immutable
·published 2006-09-07 17:45 UTC
rendered paste body
<faassen> J1m: when you develop recipes
<faassen> J1m: how do you test them during development?
<faassen> J1m: that is, how does buildout find them?
<faassen> J1m: I'm grasping for some patterns there.
* batlogg (i=batlogg@plone/batlogg) has joined #zope3-dev
<Theuni> faassen: recipes are eggs and - if i'm not mistaken - will be looked for via easy install
<faassen> Theuni: where is easy install finding them during development?
<faassen> there must be some way J1m tested the 3 zope 3 eggs.
<faassen> together.
<Theuni> for one at pypi, but if you set 'find-links' in the buildout, it will additionally use those pages as places to look out for
<faassen> and then fixed bugs in possibly all of them.
<J1m> faassen: I always develop them as develop eggs.
<faassen> J1m: how do you pull them together?
<Theuni> http://svn.zope.org/zc.buildout/trunk/buildout.cfg?rev=69987&view=auto
<faassen> J1m: you have a directory with 3 develop eggs and such?
<J1m> Look at zc.buildout.
<J1m> In buildout.cfg, I have a develop section that names my two egg directories, which have setup.py files.
<J1m> This causes them to be installed as develop eggs.
<faassen> J1m: okay, so when you developed the zope 3 eggs, you have a testing buildout somewhere?
<faassen> J1m: and you check out the 3 eggs into that testing directory?
<J1m> No
<J1m> Just a sec.
<faassen> J1m: sorry, you check out the 3 things from svn.
<faassen> J1m: and they have setup.py
<faassen> J1m: I meant to say.
* nathany has quit ("Ex-Chat")
<faassen> J1m: they're not eggs yet, but they can be installed as develop eggs if you list them under the 'develop' section.
<J1m> exactly
<faassen> right, sorry, I just expressed myself badly.
<faassen> just grasping for patterns here, but I think I see now.
<J1m> Now most of the zope 3 recipes don't have tests. :(
<J1m> I should, for each of those projects have tests and a buildout that gives me a test script to run the tests.
<J1m> The filestorage recipe has some tests, but I ran those tests as part of the zc.sharing buildout.
<J1m> I really should set up a separate buildout for it.
<J1m> You could write tests for recipes at two levels:
<J1m> - Unit level tests are probably easier to write.  You provide a faux buildout and make sure that the recipe interacts with it in the right way.
<J1m> Because the interaction is very simple, this sort of tst is straightforward to write.
<faassen> you basically just need to provide some parts directory
<J1m> I experiemented with this for the filestorage recipe tests.
<faassen> and some options
<J1m> More or less.
<J1m> Unfortunately, this sort of test has pretty much zero documentation value. :(
<J1m> I consider the filestorage recipe tests to be a bit of a failure.
<J1m> Alternatively, you can write tests that actually run buildout with the recipe.
<faassen> and then verify whether stuff is actually there.
<faassen> where you expect it to be.
<J1m> These tests, have more documentation value, but are much harder to write.
<J1m> yes
<faassen> why are they much harder to write?
<J1m> The zc.recipes.egg and zc.recipes.testrunner tests illustrate this.
<J1m> Because:
<J1m> - You end up running programs and capturing output