This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Recipients berker.peksag, ezio.melotti, giampaolo.rodola, michael.foord, rbcollins
Date 2014-05-25.15:39:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401032390.63.0.0597803774176.issue18381@psf.upfronthosting.co.za>
In-reply-to
Content
I get a test failure when I run the test suite with unittest.patch:

test_Exit (unittest.test.test_program.Test_TestProgram) ... test test_unittest crashed -- Traceback (most recent call last):
  File "/home/berker/projects/cpython-default/Lib/test/regrtest.py", line 1278, in runtest_inner
    test_runner()
  File "/home/berker/projects/cpython-default/Lib/test/test_unittest.py", line 8, in test_main
    support.run_unittest(unittest.test.suite())
  File "/home/berker/projects/cpython-default/Lib/test/support/__init__.py", line 1764, in run_unittest
    _run_suite(suite)
  File "/home/berker/projects/cpython-default/Lib/test/support/__init__.py", line 1730, in _run_suite
    result = runner.run(suite)
  File "/home/berker/projects/cpython-default/Lib/unittest/runner.py", line 178, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 647, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 597, in run
    testMethod()
  File "/home/berker/projects/cpython-default/Lib/unittest/test/test_program.py", line 119, in test_Exit
    testLoader=self.FooBarLoader())
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 726, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 173, in handle
    callable_obj(*args, **kwargs)
  File "/home/berker/projects/cpython-default/Lib/unittest/main.py", line 93, in __init__
    self.runTests()
  File "/home/berker/projects/cpython-default/Lib/unittest/main.py", line 244, in runTests
    self.result = testRunner.run(self.test)
  File "/home/berker/projects/cpython-default/Lib/unittest/runner.py", line 178, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/suite.py", line 125, in run
    test(result)
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 647, in __call__
    return self.run(*args, **kwds)
  File "/home/berker/projects/cpython-default/Lib/unittest/case.py", line 597, in run
    testMethod()
  File "/home/berker/projects/cpython-default/Lib/unittest/test/test_program.py", line 60, in testFail
    assert False
AssertionError

The new patch (see issue18381.diff) fixes that failure. Other changes:

* Added documentation
* Added a test case for addWarning and TestResult.warnings
* Added "print warning" feature
History
Date User Action Args
2014-05-25 15:39:52berker.peksagsetrecipients: + berker.peksag, giampaolo.rodola, rbcollins, ezio.melotti, michael.foord
2014-05-25 15:39:50berker.peksagsetmessageid: <1401032390.63.0.0597803774176.issue18381@psf.upfronthosting.co.za>
2014-05-25 15:39:50berker.peksaglinkissue18381 messages
2014-05-25 15:39:50berker.peksagcreate