[pony-build] Test Fixed

C. Titus Brown ctb at msu.edu
Sat Apr 17 21:52:51 PDT 2010


On Sat, Apr 17, 2010 at 08:47:00PM -0500, Fatima Cherkaoui wrote:
> Hello Titus,
> 
> What I've done to test was :
> *
> # forcibly check out revision 7 instead of revision 1.
>         (ret, out, err) = _run_command(['hg', 'checkout', '7'],
>                                        cwd='pony-build-hg-test')
> *Then I checked for the existence of new files.

Right, so I saw -- I'm not sure what that's testing, though :).  Is
it testing any functionality in pony-build?

> In Hg clone all branches are automatically cloned and it points to the
> default branch .
> We could allow the hgClone to clone  and point to a different branch from
> the beginning but I don't think it will be very useful so I guess will have
> to refactor.

How is that (having it point to a different branch from the beginning)
different from what GitClone does?  It strikes me as quite useful --
the idea would be to allow testing of multiple versions (say, a release
and an in-development version) off of the same repository.

Reading

http://mercurial.selenic.com/wiki/FAQ#FAQ.2BAC8-Terminology.What_are_branches.2C_merges.2C_heads.2C_and_the_tip.3F

and

http://mercurial.selenic.com/wiki/NamedBranches

it sounds like we could have HgClone do *exactly* the same thing as GitClone,
with 'branch' defaulting to 'default' but allowing the user to specify any
named branch that they want to make the branch in the current working
directory, i.e. the branch they actually want to configure, build, and test.

But... rather than doing more coding, could you instead start by outlining a
series of steps in pseudocode or English that would distinguish between
this working and *not* working?  Then you'll be in a better position to
write a test for it...

> Also , when I run the test_qx_web test , I get this error for all tests.
> *
> Fatima at FATIMA-PC /c/Python26/pony-build/pony_build/tests (f_master)
> $ nosetests test_qx_web.py
> EEEEE
> ======================================================================
> ERROR: pony_build.tests.test_qx_web.test_index
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg\nose\case.py",
> line
> 186, in runTest
>     self.test(*self.arg)
>   File "C:\Python26\pony-build\pony_build\tests\test_qx_web.py", line 80, in
> tes
> t_index
>     go(testutil._server_url)
>   File "C:\Python26\lib\site-packages\twill\commands.py", line 112, in go
>     browser.go(url)
>   File "C:\Python26\lib\site-packages\twill\browser.py", line 122, in go
>     raise BrowserStateError("cannot go to '%s'" % (url,))
> BrowserStateError: cannot go to 'http://localhost:8912/'*
> 
> I have tried changing  the server url  "
> http://lyorn.idyll.org/ctb/pb-dev/p/test-expire/" just to check but I don't
> think it's the best way to do it . Could you help with this.

Hmm, for reasons that I don't clearly understand it seems you have to run
the tests from *outside* that directory.  e.g.,

   nosetests pony_build\tests\test_qx_web.py

should work.  Let me know if it doesn't.

cheers,
--titus



More information about the pony-build mailing list