Supports soft assertions in extending the unittest.TestCase class
Project description
softest - Soft Assertions
Supports the soft assert style of testing, where multiple assertions can fail within the same method, while collecting and formatting those failures' stack traces for reporting by a final assert_all call.
Such stack traces are enhanced to include the call hierarchy from within the test class.
Usage
import softest
class ExampleTest(softest.SoftTestCase):
def test_example(self):
self.soft_assert(self.assertEqual, 'Worf', 'wharf', 'Klingon is not ship receptacle')
self.soft_assert(self.assertTrue, True)
self.soft_assert(self.assertTrue, False)
self.assert_all()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
softest-1.0.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for softest-1.0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69852ead7c3e8a16d595861240a694e0704587cd5e890f374edfdcc3310439c1 |
|
MD5 | 47990e9555fbe9bc1604f541468d59cd |
|
BLAKE2b-256 | c9c545922705c673401260d37dcdf94dc9d5a16a5e706b9e31e146ce01a51fdf |