Question on snake server test runs

http://snake.cs.uni-duesseldorf.de/pypytest/summary.html I added a py.test option to pretty-print Common Lisp source files, and tests on snake server started to fail. Samuele told me that it might depend on the working directory from which py.test is run, but no matter how I try, I couldn't reproduce the failure in my machine. So my question is: how are tests run on snake server? How can I fix this failure? E if conftest.option.prettyprint:
AttributeError: Values instance has no attribute 'prettyprint'
Seo Sanghyeon

Hi Seo! On Tue, Apr 25, 2006 at 19:37 +0900, Sanghyeon Seo wrote:
you are definining the new option in pypy/translator/cl/conftest.py but this file is not considered for global py.test runs. Considering all conftest.py files recursively in a tree would mean that even for a "py.test --help" you would have to wait too long. The alternative is to allow a conftest.py file to specify a list of relative "dependent" conftest.py files so that we can get rid of this problem. For now, you could just move your extra option to the more global pypy/conftest.py. best, holger

Hi Seo, On Tue, Apr 25, 2006 at 07:37:38PM +0900, Sanghyeon Seo wrote:
E if conftest.option.prettyprint:
AttributeError: Values instance has no attribute 'prettyprint'
It's hard to reproduce because it doesn't depend on the current working directory, but on the directory specified as the starting point to look for tests. One way to reproduce it is: in pypy/translator: py.test -k test_cl (The -k causes all tests files or names not starting with test_cl to be skipped to make it a bit faster.) The reason for the problem is that you're importing the wrong conftest: the one at pypy level instead of your own. Your option shows up on the object pypy.translator.cl.conftest.option, which I think is not the same as pypy.conftest.option -- at least not always (I'm not sure I understand the precise logic here :-) (I had to try things a bit before figuring this out, so now I've just checked in the result.) A bientot, Armin.

Hi Seo! On Tue, Apr 25, 2006 at 19:37 +0900, Sanghyeon Seo wrote:
you are definining the new option in pypy/translator/cl/conftest.py but this file is not considered for global py.test runs. Considering all conftest.py files recursively in a tree would mean that even for a "py.test --help" you would have to wait too long. The alternative is to allow a conftest.py file to specify a list of relative "dependent" conftest.py files so that we can get rid of this problem. For now, you could just move your extra option to the more global pypy/conftest.py. best, holger

Hi Seo, On Tue, Apr 25, 2006 at 07:37:38PM +0900, Sanghyeon Seo wrote:
E if conftest.option.prettyprint:
AttributeError: Values instance has no attribute 'prettyprint'
It's hard to reproduce because it doesn't depend on the current working directory, but on the directory specified as the starting point to look for tests. One way to reproduce it is: in pypy/translator: py.test -k test_cl (The -k causes all tests files or names not starting with test_cl to be skipped to make it a bit faster.) The reason for the problem is that you're importing the wrong conftest: the one at pypy level instead of your own. Your option shows up on the object pypy.translator.cl.conftest.option, which I think is not the same as pypy.conftest.option -- at least not always (I'm not sure I understand the precise logic here :-) (I had to try things a bit before figuring this out, so now I've just checked in the result.) A bientot, Armin.
participants (4)
-
Antonio Cuni
-
Armin Rigo
-
hpk@trillke.net
-
Sanghyeon Seo