Re: py.test generative tests behavior unexpected

2007-12-14 Thread Carl Friedrich Bolz
Jim Vickroy wrote:
 Hello all,
 
 I'm a first time user of py.tests.
 
 My setup is:
 * py.test v0.9.0
 * Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
 (Intel)] on win32
 * Microsoft Windows XP Pro (service pack 2)
 
 The attached file (py-test-generator-trial.py) demonstrates a behavior I 
 do not understand.
 
 When test_filters() is implemented as a generator, the tests appear to 
 be run twice and all tests fail during the second iteration except for 
 the final case ('AL12_1','Gray') in the loop.
 
 When the yield statement, in test_filters(), is disabled and the 
 assertion statement is enabled, the behavior is as expected -- namely 
 the tests are performed once and all pass.
 
 Could someone help me to understand this behavior?

I think you will have more luck at the py-lib developer mailing list here:

[EMAIL PROTECTED]

The mailman list info is here:

http://codespeak.net/mailman/listinfo/py-dev

Cheers,

Carl Friedrich
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: py.test generative tests behavior unexpected

2007-12-14 Thread Jim Vickroy
Carl Friedrich Bolz wrote:
 Jim Vickroy wrote:
 Hello all,

 I'm a first time user of py.tests.

 My setup is:
 * py.test v0.9.0
 * Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
 (Intel)] on win32
 * Microsoft Windows XP Pro (service pack 2)

 The attached file (py-test-generator-trial.py) demonstrates a behavior 
 I do not understand.

 When test_filters() is implemented as a generator, the tests appear to 
 be run twice and all tests fail during the second iteration except for 
 the final case ('AL12_1','Gray') in the loop.

 When the yield statement, in test_filters(), is disabled and the 
 assertion statement is enabled, the behavior is as expected -- namely 
 the tests are performed once and all pass.

 Could someone help me to understand this behavior?
 
 I think you will have more luck at the py-lib developer mailing list here:
 
 [EMAIL PROTECTED]
 
 The mailman list info is here:
 
 http://codespeak.net/mailman/listinfo/py-dev
 
 Cheers,
 
 Carl Friedrich


Thanks, Carl; I'll give that a try.  -- jv
-- 
http://mail.python.org/mailman/listinfo/python-list