Re: [Zope-dev] ./bin/test failing with trunk zope.testing

2010-07-20 Thread Lennart Regebro
On Sun, Jul 18, 2010 at 16:58, Jonathan Lange  wrote:
> Actually, it turned out to be something of a pebkac.

Happy to hear it, zope.testrunner and zope.testing.testrunner *should*
be compatible, and if they aren't that is probably a bug.

-- 
Lennart Regebro: http://regebro.wordpress.com/
Python 3 Porting: http://python3porting.com/
+33 661 58 14 64
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ./bin/test failing with trunk zope.testing

2010-07-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan Lange wrote:
> On Sun, Jul 18, 2010 at 5:56 PM, Hanno Schlichting  wrote:
>> Hi.
>>
>> On Sun, Jul 18, 2010 at 5:50 PM, Jonathan Lange  wrote:
>>> When running zope.testing's tests on my laptop, I get many failures.
>>> I've run the tests plenty of times before and haven't got these
>>> failures. Am a bit mystified, so I'd appreciate any help.
>> Looks like the tests assume to be run under the zope.testing.testrunner:
>>
>> -runTest (zope.testing.testrunner.runner.SetUpLayerFailure)
>> ? 
>> +runTest (zope.testrunner.runner.SetUpLayerFailure)
>>
>> but you end up with the one from zope.testrunner. If you pin
>> zc.recipe.testrunner to version 1.2.0, that should do the trick for
>> now.
>>
>> Someone should look into making the tests compatible with both
>> testrunners or requiring the new zope.testrunner.
>>
> 
> Thanks.
> 
> Actually, it turned out to be something of a pebkac. I was getting
> trunk from the old Launchpad branch
> (lp:~vcs-imports/zope.testing/trunk) rather than the new Launchpad
> branch (lp:zope.testing).
> 
> With the new branch, everything works out of the box. Sorry for the noise.
> 
> While we're here, if I want to patch the Zope testrunner, should I
> submit patches against zope.testing or zope.testrunner?

Good question.  We intend to remove all the real code in
zope.testing.testrunner at some point, leaving only backward-
compatibility imports in its place.  At this point, if you are still
using the one from zope.testing in your projects, I would say to submit
the patch against that:  we should be able to use 'patch -pN' to get it
merged, likely.


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

iEYEARECAAYFAkxDKv8ACgkQ+gerLs4ltQ5KLwCdHOtMwzU1AZJc3B6PEoWmu0FW
CJcAn3w75+CTNuYi/PX/tthU8UEG1Muv
=saXV
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ./bin/test failing with trunk zope.testing

2010-07-18 Thread Jonathan Lange
On Sun, Jul 18, 2010 at 5:56 PM, Hanno Schlichting  wrote:
> Hi.
>
> On Sun, Jul 18, 2010 at 5:50 PM, Jonathan Lange  wrote:
>> When running zope.testing's tests on my laptop, I get many failures.
>> I've run the tests plenty of times before and haven't got these
>> failures. Am a bit mystified, so I'd appreciate any help.
>
> Looks like the tests assume to be run under the zope.testing.testrunner:
>
> -    runTest (zope.testing.testrunner.runner.SetUpLayerFailure)
> ?                 
> +    runTest (zope.testrunner.runner.SetUpLayerFailure)
>
> but you end up with the one from zope.testrunner. If you pin
> zc.recipe.testrunner to version 1.2.0, that should do the trick for
> now.
>
> Someone should look into making the tests compatible with both
> testrunners or requiring the new zope.testrunner.
>

Thanks.

Actually, it turned out to be something of a pebkac. I was getting
trunk from the old Launchpad branch
(lp:~vcs-imports/zope.testing/trunk) rather than the new Launchpad
branch (lp:zope.testing).

With the new branch, everything works out of the box. Sorry for the noise.

While we're here, if I want to patch the Zope testrunner, should I
submit patches against zope.testing or zope.testrunner?

jml
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ./bin/test failing with trunk zope.testing

2010-07-18 Thread Hanno Schlichting
Hi.

On Sun, Jul 18, 2010 at 5:50 PM, Jonathan Lange  wrote:
> When running zope.testing's tests on my laptop, I get many failures.
> I've run the tests plenty of times before and haven't got these
> failures. Am a bit mystified, so I'd appreciate any help.

Looks like the tests assume to be run under the zope.testing.testrunner:

-runTest (zope.testing.testrunner.runner.SetUpLayerFailure)
? 
+runTest (zope.testrunner.runner.SetUpLayerFailure)

but you end up with the one from zope.testrunner. If you pin
zc.recipe.testrunner to version 1.2.0, that should do the trick for
now.

Someone should look into making the tests compatible with both
testrunners or requiring the new zope.testrunner.

Hanno
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] ./bin/test failing with trunk zope.testing

2010-07-18 Thread Jonathan Lange
Hello,

When running zope.testing's tests on my laptop, I get many failures.
I've run the tests plenty of times before and haven't got these
failures. Am a bit mystified, so I'd appreciate any help.

jml
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.


Failure in test 
/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
testMethod()
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/doctest/__init__.py", 
line 2249, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
DocTestFailureException: Failed doctest test for 
testrunner-debugging-layer-setup.test
  File 
"/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test",
 line 0

--
File 
"/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test",
 line 100, in testrunner-debugging-layer-setup.test
Failed example:
try:
zope.testing.testrunner.run_internal(
  ['--path', dir, '-Dvv', '--tests-pattern', 'tests2'])
finally: sys.stdin = real_stdin
# doctest: +ELLIPSIS +REPORT_NDIFF
Differences (ndiff with -expected +actual):
  Running tests at level 1
  Running tests2.Layer1 tests:
Set up tests2.Layer1 in N.NNN seconds.
Running:
   a_test (tests2)
Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
  Running tests2.Layer2 tests:
Tear down tests2.Layer1 ... not supported
Running in a subprocess.
Set up tests2.Layer2
  **
  
  Can't post-mortem debug when running a layer as a subprocess!
  Try running layer 'tests2.Layer2' by itself.
  
  **
  
  Traceback (most recent call last):
- ...
+   File 
"/home/jml/.buildout/eggs/zope.testrunner-4.0.0b4-py2.6.egg/zope/testrunner/runner.py",
 Line NNN, in run_layer
+ setup_layer(options, layer, setup_layers)
+   File 
"/home/jml/.buildout/eggs/zope.testrunner-4.0.0b4-py2.6.egg/zope/testrunner/runner.py",
 Line NNN, in setup_layer
+ layer.setUp()
+   File "/tmp/tmprTh_Qv/TESTS-DIR/tests2.py", Line NNN, in setUp
  raise ValueError
  ValueError
  
  
  Tests with errors:
-runTest (zope.testing.testrunner.runner.SetUpLayerFailure)
? 
+runTest (zope.testrunner.runner.SetUpLayerFailure)
  Total: 1 tests, 0 failures, 1 errors in N.NNN seconds.
  True


--Return--
> /home/jml/src/zope.testing/trunk/src/zope/testing/doctest/__init__.py(360)set_trace()->None
-> pdb.Pdb.set_trace(self)
(Pdb) p x
*** NameError: NameError("name 'x' is not defined",)
(Pdb) c


Failure in test 
/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
testMethod()
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/doctest/__init__.py", 
line 2249, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
DocTestFailureException: Failed doctest test for testrunner-debugging.txt
  File 
"/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt",
 line 0

--
File 
"/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt",
 line 35, in testrunner-debugging.txt
Failed example:
try: testrunner.run_internal(defaults)
finally: sys.stdin = real_stdin
# doctest: +ELLIPSIS
Expected:
Running zope.testing.testrunner.layer.UnitTests tests:
...
> testrunner-ex/sample3/sampletests_d.py(NNN)test_set_trace1()
-> y = x
(Pdb) p x
1
(Pdb) c
  Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
...
False
Got:
Running zope.testing.testrunner.layer.UnitTests tests:
  Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
  Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
Tearing down left over layers:
  Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
False


--Return--
> /home/jml/src/zope.testing/trunk/src/zope/testing/doctest/__init__.py(360)set_trace()->None
-> pdb.Pdb.set_trace(self)
(Pdb) p x
*** NameError: NameError("name 'x' is not defined",)
(Pdb) c


Failure in test 
/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt
Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
testMethod()
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/docte