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

Jonathan Lange jml at mumak.net
Sun Jul 18 11:50:50 EDT 2010


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
-------------- next part --------------
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
      **********************************************************************
      <BLANKLINE>
      Can't post-mortem debug when running a layer as a subprocess!
      Try running layer 'tests2.Layer2' by itself.
      <BLANKLINE>
      **********************************************************************
      <BLANKLINE>
      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
      <BLANKLINE>
      <BLANKLINE>
      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/doctest/__init__.py", line 2249, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
DocTestFailureException: Failed doctest test for testrunner-edge-cases.txt
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt", line 0

----------------------------------------------------------------------
File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt", line 94, in testrunner-edge-cases.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)f()
    -> 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




Failure in test /home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.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-layers-buff.txt
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt", line 0

----------------------------------------------------------------------
File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt", line 96, in testrunner-layers-buff.txt
Failed example:
    try:
        testrunner.run_internal(defaults, argv)
        record = sys.stdout.record
    finally:
        sys.stdout = sys.stdout.wrapped
Expected:
    Running tests at level 1
    Running sampletests_buffering.Layer1 tests:
      Set up sampletests_buffering.Layer1 in N.NNN seconds.
      Running:
     test_something (sampletests_buffering.TestSomething1)
      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
    [Parallel tests running in sampletests_buffering.Layer2:
      .. LAYER FINISHED]
    Running sampletests_buffering.Layer2 tests:
      Running in a subprocess.
      Set up sampletests_buffering.Layer2 in N.NNN seconds.
      Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
    Total: 3 tests, 0 failures, 0 errors in N.NNN seconds.
    False
Got:
    Running tests at level 1
    Running sampletests_buffering.Layer1 tests:
      Set up sampletests_buffering.Layer1 in N.NNN seconds.
      Running:
     test_something (sampletests_buffering.TestSomething1)
      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
    [Parallel tests running in sampletests_buffering.Layer2:
      .. LAYER FINISHED]
    Running sampletests_buffering.Layer2 tests:
      Running in a subprocess.
      Set up sampletests_buffering.Layer2 in N.NNN seconds.
      Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down sampletests_buffering.Layer2 ... not supported
    Total: 3 tests, 0 failures, 0 errors in N.NNN seconds.
    False




Failure in test /home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.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-layers.txt
  File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt", line 0

----------------------------------------------------------------------
File "/home/jml/src/zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt", line 130, in testrunner-layers.txt
Failed example:
    testrunner.run_internal(defaults)
Expected:
    Running samplelayers.Layer1 tests:
      Set up samplelayers.Layer1 in N.NNN seconds.
      Ran 9 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer11 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer111 tests:
      Running in a subprocess.
      Set up samplelayers.Layerx in N.NNN seconds.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Set up samplelayers.Layer111 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer112 tests:
      Running in a subprocess.
      Set up samplelayers.Layerx in N.NNN seconds.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Set up samplelayers.Layer112 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer12 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer121 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Set up samplelayers.Layer121 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer122 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Set up samplelayers.Layer122 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
    Running zope.testing.testrunner.layer.UnitTests tests:
      Running in a subprocess.
      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
    Total: 405 tests, 0 failures, 0 errors in N.NNN seconds.
    False
Got:
    Running samplelayers.Layer1 tests:
      Set up samplelayers.Layer1 in N.NNN seconds.
      Ran 9 tests with 0 failures and 0 errors in N.NNN seconds.
    Running samplelayers.Layer11 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer11 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Running samplelayers.Layer111 tests:
      Running in a subprocess.
      Set up samplelayers.Layerx in N.NNN seconds.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Set up samplelayers.Layer111 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer111 in N.NNN seconds.
      Tear down samplelayers.Layerx in N.NNN seconds.
      Tear down samplelayers.Layer11 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Running samplelayers.Layer112 tests:
      Running in a subprocess.
      Set up samplelayers.Layerx in N.NNN seconds.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer11 in N.NNN seconds.
      Set up samplelayers.Layer112 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer112 in N.NNN seconds.
      Tear down samplelayers.Layerx in N.NNN seconds.
      Tear down samplelayers.Layer11 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Running samplelayers.Layer12 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer12 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Running samplelayers.Layer121 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Set up samplelayers.Layer121 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer121 in N.NNN seconds.
      Tear down samplelayers.Layer12 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Running samplelayers.Layer122 tests:
      Running in a subprocess.
      Set up samplelayers.Layer1 in N.NNN seconds.
      Set up samplelayers.Layer12 in N.NNN seconds.
      Set up samplelayers.Layer122 in N.NNN seconds.
      Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
      Tear down samplelayers.Layer122 in N.NNN seconds.
      Tear down samplelayers.Layer12 in N.NNN seconds.
      Tear down samplelayers.Layer1 in N.NNN seconds.
    Total: 213 tests, 0 failures, 0 errors in N.NNN seconds.
    False


  Ran 272 tests with 5 failures and 0 errors in 21.816 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.


More information about the Zope-Dev mailing list