[Zope-PAS] Re: Test layers for pastc

2007-11-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ross Patterson wrote:
> Tres Seaver <[EMAIL PROTECTED]> writes:
> 
>> Ross Patterson wrote:
>>
>>> I'd love to convert PAS's tests to layers for test setUp and tearDown.
>>> Any objections?
>> Layers are all about sharing setup across a set of tests, which means
>> they risk breaking test isolation.  I normally don't use layers for
>> anything which is a pure "unit test," but can see the point for
>> "function" or "integration" tests.
>>
>> Are there a specific set of tests you have in mind which have
>> significant setup / teardown costs?
> 
> Well I also find that layers make factoring and re-using setup much
> easier, so that was my motivation.  If that's an abuse of the intentions
> of layers, then nevermind.  :)

Hmm, I guess I would need to see the specific changes you have in mind.
 If the "shared setup" in the layer creates state which coould
potentially be "scribbled on" by one or more tests, then I "agin'it", at
least for unit testing.

I'd rather rewrite tests to *remove* code from setup (creating fixtures
by calling helper methods / functions in the test case), than try to
make shared fixtures more efficient to create.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQggW+gerLs4ltQ4RAmq2AJ9kC9t1eBTmfXqzbIWtClDIRiekLQCeOgDM
kvxXDq08ULB5GargRRQceB4=
=0KTf
-END PGP SIGNATURE-

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope-PAS] Re: Test layers for pastc

2007-11-19 Thread Ross Patterson
Tres Seaver <[EMAIL PROTECTED]> writes:

> Ross Patterson wrote:
>
>> I'd love to convert PAS's tests to layers for test setUp and tearDown.
>> Any objections?
>
> Layers are all about sharing setup across a set of tests, which means
> they risk breaking test isolation.  I normally don't use layers for
> anything which is a pure "unit test," but can see the point for
> "function" or "integration" tests.
>
> Are there a specific set of tests you have in mind which have
> significant setup / teardown costs?

Well I also find that layers make factoring and re-using setup much
easier, so that was my motivation.  If that's an abuse of the intentions
of layers, then nevermind.  :)

Ross

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope-PAS] Re: Test layers for pastc

2007-11-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ross Patterson wrote:

> I'd love to convert PAS's tests to layers for test setUp and tearDown.
> Any objections?

Layers are all about sharing setup across a set of tests, which means
they risk breaking test isolation.  I normally don't use layers for
anything which is a pure "unit test," but can see the point for
"function" or "integration" tests.

Are there a specific set of tests you have in mind which have
significant setup / teardown costs?


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQfr/+gerLs4ltQ4RAlOiAJ9b0oLr3bQ6kzQ7uIEZrVCCCYw65wCdG9/4
lt+xV0R1dR0axvqorh6ls64=
=AFQu
-END PGP SIGNATURE-

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas