| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Change-Id: I76ba3261129736a714d7b265d21a29264f1c2974
|
| | |
|
| | |
|
| |
|
|
| |
Change-Id: I4613d47852fbf901819f197f6e388ccaa717b53e
|
| | |
|
| |
|
|
|
|
| |
Since the StringIO buffer is positioned at end-of-file after the
underlying test finishes, the twisted-log detail was previously always
empty.
|
| |
|
|
|
|
|
|
|
| |
Empty attachments to tests were triggering a file payload of None in the
``ExtendedToStreamDecorator`` code, which caused multiple copies of
attachments that had been output prior to the empty one.
(Robert Collins, #1378609)
Change-Id: I34a989546d57b245d4384b8c5b6d444e7ce0ac1b
|
| |
|
|
|
|
|
|
|
|
|
| |
unittest2 recently added the ability to show local variables in
tracebacks as https://github.com/testing-cabal/testtools/issues/111
requested for us. Reusing that requires some refactoring of our code,
in particular where we were reimplementing bits of the traceback
module. Now we can just hard-depend on traceback2 and linecache2 which
are brought in by unittest2 1.0.0.
Change-Id: Ieb3268029d26b48ed4fcd25ed644bd339f6aa3fb
|
| |
|
|
|
|
|
|
| |
When an import error happens ``testtools.run`` will now show the full
error rather than just the name of the module that failed to import.
(Robert Collins)
Change-Id: I2d9d7a4659b51a5e3ea8000301ecb799ed30f463
|
| |
|
|
|
|
|
|
| |
``testtools.TestCase`` now inherits from unittest2.TestCase, which
provides a ``setUpClass`` for upcalls on Python 2.6.
(Robert Collins, #1393283)
Change-Id: Id56212e3d7d519c7b73d2e19d3e34013fac34544
|
| |
|
|
| |
Change-Id: I1f314c91c4e852edafabc7cf3d2b01abe8a62fa3
|
| |
|
|
|
|
|
|
| |
This brings in many fixes made to discovery where previously we were only using
the discovery package or the version in the release of Python that the test
execution was occuring on. (Robert Collins, #1271133)
Change-Id: I6270c8e8949262c01cb3a4e40735077ad6fc1ef2
|
| |
|
|
|
|
|
| |
We use test parameterisation in test_deferredruntest, but hadn't
defined a load_tests hook to inform discover of that.
Change-Id: Ib32d7cf88b1a9e311476a5286357e46e65de1f1f
|
| |
|
|
|
|
|
|
|
|
|
| |
Our tests currently import test_with_with into test_testcase so that
we could still run tests on python2.5. Since we no longer support
2.5, we don't need this hack. Its a hack because discovery will
import test_with_with directly itself, and thus we triggered
a duplicate test id error when attempting to use discover on the
testtools test base.
Change-Id: I027929ab4b0df350dd18ab01ffd5c493fe35e101
|
| | |
|
| |
|
|
| |
were reported.
|
| |
|
|
|
|
|
|
| |
Exceptions in a ``fixture.getDetails`` method will no longer mask
errors raised from the same fixture's ``setUp`` method.
(Robert Collins, #1368440)
Change-Id: I39da334ba57683fd71a5d7af16c32d9170f6e626
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a long-standing bug where tearDown and cleanUps would not be
called if the test run was interrupted. This should fix leaking
external resources from interrupted tests.
(Robert Collins, #1364188)
Fix a long-standing bug where calling sys.exit(0) from within a test
would cause the test suite to exit with 0, without reporting a failure
of that test. We still allow the test suite to be exited (since
catching higher order exceptions requires exceptional circumstances)
but we now call a last-resort handler on the TestCase, resulting in an
error being reported for the test.
(Robert Collins, #1364188)
Change-Id: I0700f33fe7ed01416b37c21eb3f3fd0a7ea917eb
|
| |
|
|
| |
tearDown test methods.
|
| |
|
|
|
|
|
|
|
| |
Discover was not executing load_tests at the package level, in
contrast to the docs which suggested it was possible. This is a
backport of the Python upstream proposed fix.
Change-Id: Ib952d5ce4ae1a3da0cd27dcf09315d20055d6b5a
Closes-Bug: http://bugs.python.org/issue16662
|
| |
|
|
|
|
|
|
| |
We were failing to pass it into the runner, and this causes hilarity
for child runners which then end up with sys.stdout in their test
suite, rather than their stub streams.
Change-Id: I19984102547f92493f330059928f7e0b3897c38c
|
| |
|
|
|
|
|
|
|
| |
The ``ExtendedToStreamDecorator`` now handles content objects with one
less packet - the last packet of the source content is sent with EOF
set rather than an empty packet with EOF set being sent after the last
packet of the source content.
Change-Id: If908c1fe8e6fbe2ac3834a1cd99e7cd8ace45b3b
|
| |
|
|
|
|
|
| |
TestCase.setUp and TestCase.tearDown are only meant to be called once.
Change-Id: If39046eed35257938062b07655b50d9bef0ea5ee
Closes-Bug: #882884
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
NEWS
doc/for-test-authors.rst
testtools/testcase.py
testtools/tests/test_testcase.py
|
| | |\
| | |
| | | |
Fix expected failure
|
| | | | |
|
| | | |
| | |
| | |
| | | |
early as possible.
|
| | |/
| |
| |
| |
| | |
Just like many other asserts, add an optional message to assertIn
and assertNotIn. This allows for more descriptive failures.
|
| | |
| |
| |
| | |
Change-Id: I387df10140fe76af03d2ec693b35e326b2da932e
|
| |/ |
|
| |
|
|
| |
This reverts commit ba8af964e7e2b7378e21874c4383870b82bd1599.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Adapt test_compat.TestDetectEncoding.test_bom to skip compile
step on corner case that is no longer valid on Python 3.3
and later.
Change-Id: Ia4d5949363ca4cea603c2a0847742a1df8f68709
|
| |
|
|
|
|
|
| |
fail and raise TypeError.
Detect the duplicate test ids firstly in sorted_tests() to ensure
that all test ids are unique.
|
| |
|
|
| |
Change-Id: Idb8c8d0c837ab2cb6ec53c84d144c29b5d6da8ea
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Test listing now explicitly indicates by printing 'Failed to import' and
exiting (2) when an import has failed rather than only signalling through the
test name. This plus the introduction of a public helper lays the groundwork
for fixing a usability bug in testrepository caused by the interaction between
failed listings and user test filters.
Change-Id: I7fb8cb70c515c54d8febd68ba791c27db0a7a9c4
Closes-Bug: #1245672
|
| |
|
|
|
|
|
|
| |
In test_run we were assuming that testtools.run -l wouldn't be evil and call
sys.exit(), but calling sys.exit() is the contract of TestProgram, so we should
be paranoid about it.
Change-Id: I72d81942322eb9c1d57356741fa0f3806ebf14e8
|
| |
|
|
|
|
| |
We were leaving testtools.runexample behind which breaks test isolation.
Change-Id: I500c20317183596d28f09c0b5a62b03f5f009e4f
|
| |
|
|
|
|
|
|
| |
We have a sandbox for building packages that doesn't allow this and it
seems to be a good idea in general not to bind to all interfaces, some
of which will be reachable from other machines to run simple tests.
Change-Id: I6cf82d6bd67437dc29d7f9d6c886dadb6e6d8f95
|
| |
|
|
|
|
|
|
| |
StreamSummary was calculating testsRun incorrectly: exists status tests were
counted as run tests, but they are not.
Change-Id: I9581be45e878a4281904e2039dd7790f9bc1a3bb
Closes-Bug: #1203728
|
| | |
|
| |\
| |
| | |
Refactor testtools.compat._format_exc_info into two separate functions.
|
| | | |
|
| |/ |
|