Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

Running functional tests in a buildout environment

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


charlie at begeistert

Jan 12, 2009, 8:54 AM

Post #1 of 6 (639 views)
Permalink
Running functional tests in a buildout environment

Hi,

I've been struggling (and pestering Jens) with running the test on my
formlib-based contents view for folders. It seems that CMFDefault/
browser/tests.py is being ignored when called from within the sandbox

bin/test -vv -fs ~/CMF-Sandbox/cmf-trunk/src/Products.CMFDefault/
Products/CMFDefault/browser/ tests.py
Running tests at level 1
Total: 0 tests, 0 failures, 0 errors in 0.000 seconds.

whereas if I in an old-style instance I run
bin/zopectl test -vv -fs Products/CMFDefault/browser/ tests.py

I get

bin/zopectl test -vv -fs Products/CMFDefault/browser
/opt/Zope-2.11/lib/python/ZPublisher/Iterators.py:1:
DeprecationWarning: The Interface package is deprecated and will be
removed in Zope 2.12. Use zope.interface instead.
from Interface import Interface
Running tests via: /Library/Frameworks/Python.framework/Versions/2.4/
Resources/Python.app/Contents/MacOS/Python /opt/Zope-2.11/bin/test.py -
v --config-file /Users/charlieclark/Sites/zurich/etc/zope.conf -vv -fs
Products/CMFDefault/browser
Parsing /Users/charlieclark/Sites/zurich/etc/zope.conf
/opt/Zope-2.11/lib/python/ZPublisher/Iterators.py:1:
DeprecationWarning: The Interface package is deprecated and will be
removed in Zope 2.12. Use zope.interface instead.
from Interface import Interface
Running tests at level 1
Running Products.CMFDefault.testing.FunctionalLayer tests:
Set up Testing.ZopeTestCase.layer.ZopeLite in 0.531 seconds.
Set up Products.CMFCore.testing.FunctionalZCMLLayer in 3.233 seconds.
Set up Products.CMFDefault.testing.FunctionalLayer in 1.853 seconds.
Running:
/Users/charlieclark/Sites/zurich/Products/CMFDefault/browser/
metadata.txt (1.528 s)
/Users/charlieclark/Sites/zurich/Products/CMFDefault/browser/
document.txt (0.784 s)
/Users/charlieclark/Sites/zurich/Products/CMFDefault/browser/
file.txt (0.610 s)
Ran 16 tests with 0 failures and 0 errors in 2.923 seconds.
Tearing down left over layers:
Tear down Products.CMFDefault.testing.FunctionalLayer in 0.068
seconds.
Tear down Products.CMFCore.testing.FunctionalZCMLLayer in 0.003
seconds.
Tear down Testing.ZopeTestCase.layer.ZopeLite in 0.000 seconds.

What am I doing wrong?

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226



_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


dieter at handshake

Jan 12, 2009, 10:48 AM

Post #2 of 6 (599 views)
Permalink
Re: Running functional tests in a buildout environment [In reply to]

Charlie Clark wrote at 2009-1-12 17:54 +0100:
> ...
>bin/test -vv -fs ~/CMF-Sandbox/cmf-trunk/src/Products.CMFDefault/
>Products/CMFDefault/browser/ tests.py
>Running tests at level 1
>Total: 0 tests, 0 failures, 0 errors in 0.000 seconds.

For modern Zopes the value for the "-s" option is a module
(e.g. "Products.CMFDefault").
You would use "--package_path" when you want to specify
a location for a package (likely).

There is BBB code that tries to handle paths also for
"-s" but this code is highly dubious (and probably not
working in all cases).

The "zope.testing" experts are Jim and Christian (Th.).



--
Dieter
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


charlie at begeistert

Jan 12, 2009, 11:28 AM

Post #3 of 6 (595 views)
Permalink
Re: Running functional tests in a buildout environment [In reply to]

Am 12.01.2009 um 19:48 schrieb Dieter Maurer:

> For modern Zopes the value for the "-s" option is a module
> (e.g. "Products.CMFDefault").
> You would use "--package_path" when you want to specify
> a location for a package (likely).
>
> There is BBB code that tries to handle paths also for
> "-s" but this code is highly dubious (and probably not
> working in all cases).


Thanks for the explanation. Using --package-path doesn't seem to help
me. But moving tests.py to the tests folder and renaming it to
test_folder does what I want. Would it be okay to do this?

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226



_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


jens at dataflake

Jan 12, 2009, 1:10 PM

Post #4 of 6 (597 views)
Permalink
Re: Running functional tests in a buildout environment [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jan 12, 2009, at 20:28 , Charlie Clark wrote:

> Thanks for the explanation. Using --package-path doesn't seem to help
> me. But moving tests.py to the tests folder and renaming it to
> test_folder does what I want. Would it be okay to do this?

If you are saying that you had both a "tests" folder and a module
"test.py" in the same place then the answer is probably "don't do that".

jens



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAklrsa8ACgkQRAx5nvEhZLJvGQCgvBpaPL9tOeOSP7kAfIOFM1pM
KT4AoKRxAcZhbx5n5V9i/lJrI7CxxapS
=Mohe
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


jens at dataflake

Jan 12, 2009, 1:14 PM

Post #5 of 6 (595 views)
Permalink
Re: Running functional tests in a buildout environment [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jan 12, 2009, at 22:10 , Jens Vagelpohl wrote:

> On Jan 12, 2009, at 20:28 , Charlie Clark wrote:
>
>> Thanks for the explanation. Using --package-path doesn't seem to help
>> me. But moving tests.py to the tests folder and renaming it to
>> test_folder does what I want. Would it be okay to do this?
>
> If you are saying that you had both a "tests" folder and a module
> "test.py" in the same place then the answer is probably "don't do
> that".

I meant "tests" folder and "tests.py" module, of course.

jens


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAklrssMACgkQRAx5nvEhZLLZEwCgg+5p2fq+W/uL2IDfWwbhbYi9
P1gAoLG9HgF9k40JlznlExbFiRhWfPkx
=EPcp
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


charlie at begeistert

Jan 12, 2009, 1:24 PM

Post #6 of 6 (595 views)
Permalink
Re: Running functional tests in a buildout environment [In reply to]

Am 12.01.2009 um 22:10 schrieb Jens Vagelpohl:

> If you are saying that you had both a "tests" folder and a module
> "test.py" in the same place then the answer is probably "don't do
> that".


I didn't but that is the current state of play in CMFDefault/browser.
I've moved my test into the tests folder.

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226



_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.