[py-dev] Running py lib unit tests in Pybots

Carl Friedrich Bolz cfbolz at gmx.de
Fri Oct 13 00:58:03 CEST 2006


Grig Gheorghiu wrote:
> On 10/12/06, *Grig Gheorghiu* <grig at agilistas.org
> <mailto:grig at agilistas.org>> wrote:
> 
>     On 10/12/06, *holger krekel* <hpk at trillke.net
>     <mailto:hpk at trillke.net>> wrote:
> 
>         go ahead and post here any problems :) 
> 
> 
> 
> OK, I just did an svn co of the py lib on an Ubuntu Breezy box and I get
> 2 failures when running py.test in the topmost directory:
> 
> ________________________ entrypoint: test_importall[81]
> ________________________
> 
>     def check_import(modpath):
>         print "checking import", modpath
>>       assert __import__(modpath)
> 
> [/tmp/pylib/py/misc/testing/test_initpkg.py:67]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _
> 
>     """
> 
>     from py.__.test.rsession.web import exported_methods
> E   from pypy.translator.js.modules import _dom as dom
>>   ImportError: No module named pypy.translator.js.modules
> 
> [/tmp/pylib/py/test/rsession/webjs.py:6]
> - - - - - - - - - - - - - -  [81]: recorded stdout - - - - - - - - - - -
> - - - -
> checking import py.__.test.rsession.webjs
> 
> ________________________________________________________________________________
> 
> ______________________ entrypoint: test_slave_main_simple
> ______________________
> 
>     def test_slave_main_simple():
>         res = []
>         q = [None,
>              funcpass_spec,
>              funcfail_spec
>             ]
>         slave_main(q.pop, res.append, str(rootdir))
>         assert len(res) == 2
>         res_repr = [ReprOutcome(r) for r in res]
>         assert not res_repr[0].passed
> E       assert res_repr[1].passed
>>       assert <ReprOutcome signal=0 passed=False skipped=None
> setupfailure=False excinfo=<Ex...close()\n            self.retval =
> marshal.loads(retval_data)]> stdout= stderr=>.passed
> 
> [/tmp/pylib/py/test/rsession/testing/test_slave.py:110]
> ________________________________________________________________________________
> ===== tests finished: 1168 passed, 2 failed, 53 skipped in 137.70
> seconds ======
> 
> 
> Looks like the first test tries to import something from pypy, which I
> haven't checked out. The second test -- not sure why it fails. Are these
> failures expected?

I don't think they are, but they might go undetected (since we all have
pypy checked out :-)). In theory the code should make sure that if pypy
is not importable it still works (maybe skipping the test or something).
Will look into it.

Thanks for the reporting!

Cheers,

Carl Friedrich



More information about the Pytest-dev mailing list